Segregating private and public workloads
Since the actions taking place in AWS are internal, we should separate the workloads into private and public.
The REST-based Lambda application receiving the JSON payload needs to be on a public network, since it will interact with the end user. The SQS-based Lambda application, reading the SQS events and storing them in S3, needs to be private. The application simulating the SQS events to the SQS-based Lambda application will also be private.
The mock AWS components, such as DynamoDB, SQS, and S3, should use the private network.
We shall define the networks with the following Compose configuration:
networks: aws-internal: aws-public:
By having the private networks defined, we can now proceed with adding the mock AWS components to the Compose application.