AWS Amplify to Amazon API Gateway with Amazon Cognito

AWS Amplify → API Gateway → AWS Lambda

Create an Amplify frontend that calls Amazon API Gateway using Cognito

This pattern explains how to deploy an AWS SAM application that includes an AWS Amplify frontend, Cognito, API Gateway and Lambda Function. It also sets environmental variables to be used by Amplify and Lambda Function.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/amplify_cognito_apigateway_lambda_envvariables

Deploy

sam deploy --guided


Testing

See the repo for detailed testing notes.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Adilson Perinei

Adilson Perinei

AWS Cloud Application Architect with 6 AWS certifications. Adilson loves to develop application using AWS infrastructure using SAM.