This sample provisions a GraphQL API on AppSync backed by DynamoDB.
It creates:
- a DynamoDB table named
tenants - an AppSync GraphQL API with API key auth
- a
Mutation.addTenant(id, name)resolver to write tenant records - a
Query.getTenantById(id)resolver to read tenant records
- A valid LocalStack for AWS license. Your license provides a
LOCALSTACK_AUTH_TOKEN. - Docker
localstackCLIawslocalCLI- Pulumi
pulumilocalCLImakeandjq
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
localstack auth set-token $LOCALSTACK_AUTH_TOKEN
localstack start -d
localstack wait -t 30pip install -r requirements.txt
pulumilocal stack init dev
pulumilocal config set aws:region us-east-1
pulumilocal upAfter deployment, use pulumilocal stack output to get the GraphQL endpoint and API key, then run GraphQL queries against the API.