- A simple example with CRUD operation to accept request via API Gateway and interact with DynamoDB backend table. AWS services used:
- API Gateway
- Lambda authorizer function is used to authentcate request using a token passed from API Gateway.
- The authorizer function evaluates incoming toekn and returns allow or deny security policy back to API Gateway.
- If 'allow' return policy is returned from the authorizer function, API Gateway forward the request to a lambda function based on the request resource and method.
- Lambda
- DynamoDB
- API Gateway
-
Client will receive 202-Accepted response but not the actual response detail of a function logic. Once processing gets completed, response payload will be sent to a destination:
- SNS topic
- SQS queue
- Lambda function
- EventBridge event bus
- Kinesis or DynamoDB stream
-
Destinations needs to be configured in the Lambda function config. in AWS Console or using Lambda API.
- The event trigger will be DynamoDB stream (events from CRUD operations on an item).
- Lambda function logic receives the stream event from DynamoDB and executes additional logic. The response can be sent to a destination, if needed.