Currently, we have our create API call create all the resources while the client waits for a response. A better architecture would be to just drop a message in an SQS queue and return to the client. Another Lambda function could process those messages and create the resources. The client would then check the status of the creation after the initial API Call.
Benefits
API returns to client faster
Clients won't need to retry calls that fail. They will be retried by the processing function automatically.
Simpler reasoning about retry logic
Processing the dead letter queue will make cleanup simpler and more thorough, likely resulting in leaving fewer orphaned resources in our account
Currently, we have our
create
API call create all the resources while the client waits for a response. A better architecture would be to just drop a message in an SQS queue and return to the client. Another Lambda function could process those messages and create the resources. The client would then check the status of the creation after the initial API Call.Benefits