This is somewhat of a contrived application that demonstrates how localstack can be used in conjunction with serverless and cloudformation for local development of AWS components:
yarn local:up
# tear down localstack docker container
yarn local:down
yarn dev
yarn test
# clear S3, SQS and Dynamo
yarn purge
awslocal sns list-topics
awslocal sns publish --topic-arn "arn:aws:sns:us-east-1:000000000000:image-created" --message 'test image created message'
awslocal sns publish --topic-arn "arn:aws:sns:us-east-1:000000000000:image-updated" --message 'test image updated message'
awslocal sqs list-queues
awslocal sqs send-message --message-body="{}" --queue-url "http://localhost:4566/queue/test"
awslocal sqs receive-message --queue-url "http://localhost:4566/queue/test" --max-number-of-messages 10
awslocal sqs delete-message --queue-url "http://localhost:4566/queue/test" --receipt-handle <handle>
awslocal sqs send-message --message-body="test-dlq" --queue-url "http://localhost:4566/queue/imports"
awslocal sqs receive-message --queue-url "http://localhost:4566/queue/imports-dlq" --max-number-of-messages 10
awslocal s3api list-buckets
awslocal s3 cp test/test-dynamo-record.json s3://images
awslocal s3api list-objects --bucket images
Bucket content is available here, using the image hash as the slug to get a specific image, e.g.
awslocal dynamodb list-tables
awslocal dynamodb put-item \
--table-name images \
--item file://test/test-dynamo-record.json \
--return-consumed-capacity TOTAL \
--return-item-collection-metrics SIZE
awslocal dynamodb scan --table-name images
awslocal dynamodbstreams list-streams