Skip to content

epomatti/aws-apigateway-lambda-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Gateway with Lambda services

In case you need a simple API solution with Lambda "nano" services, this is a small sample project with AWS SAM. Make sure to choose between the HTTP and REST API models. Look into the best authentication model, and add appropriate monitoring and tracing capabilities.

Run the commands from the integration directory:

cd integration

Build and deploy the application:

sam build
sam deploy --guided

Services will be available using POST published in the API Gateway endpoint in the $default stage:

curl -X POST https://<api-id>.execute-api.us-east-2.amazonaws.com/documents

Commands

Commands reference:

sam init --name integration --package-type Zip --architecture arm64 --runtime java21
sam build
sam validate
sam local invoke
sam sync --stack-name {{stack-name}} --watch
sam deploy --guided
sam local generate-event sqs receive-message --body '{"hello": "world"}'
sam local invoke ServerlessConsumerFunction --event events/sqs.json
sam delete

Sources