aws-amplify / aws-amplify/docs

Example of using aws-amplify for lambda->graphql

Open
#6,673 0 comments 0 reactions 0 assignees View on GitHub
amplify/js
Dominant language
MDX
Stars
506
Forks
1.1k
Avg merge
3h 14m
Merged PRs (30d)
1

Description

**Describe the content issue**:
The example given uses pretty low level and verbose code (http requests?) to generate a request from lambda to graphql using IAM.

It would seem to me that it should be possible to do something like:
```

Amplify.configure(config)
const client=generateClient({authMode: "iam"})
const response = await client.graphql({
query: queries.listCollisions,
})
return response.data.listCollisions.items;

```

**URL page where content issue is**:
https://docs.amplify.aws/javascript/build-a-backend/graphqlapi/connect-from-server-runtime/#iam-authorization

Contributor guide

Open the contributing guide

Research direction

Open the IAM authorization section at the linked documentation URL and compare the existing Lambda-to-GraphQL example with the requested Amplify client approach. Confirm the example's placement and conventions, then update the page so the documented flow is clear and complete for this use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql, javascript
Domain
api, cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.