https://github.com/talakb/aws-lambda-java-sdk-examples
AWS Lambda Java SDK examples for testing Lambda integration with other AWS services. Examples include synchronous (RequestResponse), asynchronous (Event), and stream processing approaches.
https://github.com/talakb/aws-lambda-java-sdk-examples
api-gateway aws aws-lambda lambda serverless
Last synced: 7 months ago
JSON representation
AWS Lambda Java SDK examples for testing Lambda integration with other AWS services. Examples include synchronous (RequestResponse), asynchronous (Event), and stream processing approaches.
- Host: GitHub
- URL: https://github.com/talakb/aws-lambda-java-sdk-examples
- Owner: talakb
- Created: 2022-04-25T15:27:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-05T08:42:09.000Z (over 3 years ago)
- Last Synced: 2025-03-13T09:22:44.162Z (about 1 year ago)
- Topics: api-gateway, aws, aws-lambda, lambda, serverless
- Language: Java
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Lambda Java SDK examples.
## 1 - Synchronous (RequestResponse) Handler
### Serverless weather API
* 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

## 2 - Asynchronous (Event) Handler
* 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.
### Send response to a queue (SQS and DLQ)

## 3 - Stream Processing Handler (TODO)
* 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.