An AWS Lambda function which serves as HTTP gateway relay messages to an SQS queue in order to trigger the worker.
Runtime=Java 11 (Corretto)
Handler=com.xiangronglin.novel.lambda.post.AwsHandler::handleRequest
Architecture=x86_64
Set these values as environment variables for the lambda function.
SQS_QUEUE_URL=<your-sqs-url>
DYNAMO_DB_TABLE_NAME=<your-table-name>
REGION=<your-region>
JAVA_TOOL_OPTIONS=-XX:+TieredCompilation -XX:TieredStopAtLevel=1
The lambda needs a role with permission:
- "sqs:SendMessage"
- "dynamodb:PutItem"
And optionally for logging
- Policy "AWSLambdaBasicExecutionRole"