Skip to content

Add an asynchronous API #23

@brettstack

Description

@brettstack

This is a very common and powerful Serverless pattern. You can see an example of it implemented here https://github.com/brettstack/civ6-play-by-cloud-turn-notifier.

Acceptance Criteria:

  1. Add a Lambda Function connected to the POST /sqs endpoint that stores the body of the request on the SQS Queue (see the Civ repo for implementation, though it should be simplified as much as possible)
  2. Render two buttons to the UI that invoke the API endpoint POST /sqs - one should send a valid message, and the other should send a malformed message (to experiment with DLQs)
  3. Add a Lambda Function connected to the SQS Queue that increments a value against the current logged in user. The Lambda Function should use the https://www.npmjs.com/package/@middy/sqs-partial-batch-failure middleware similar to the Civ repo and should throw when it detects a malformed SQS message
  4. Alarms should be configured for the ApproximateAgeOfOldestMessage and NumberOfMessagesSent metrics on the DLQ.
  5. The ApproximateAgeOfOldestMessage alarm should be configured as a rollback trigger Add CloudFormation Rollback Alarms/Triggers #11
  6. Software architecture diagram is updated

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions