Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Store SQS Messages in S3 Buckets

In this example, we will demonstrate how to store SQS messages in S3 buckets. We will use LocalStack to emulate AWS services locally with Pulumi's Node.js SDK.

Prerequisites

Start LocalStack

export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
localstack auth set-token $LOCALSTACK_AUTH_TOKEN
localstack start -d
localstack wait -t 30

Initialize Pulumi Stack

pulumilocal stack init queues
pulumilocal config set aws:region us-east-1

Deploying the stack

To preview and deploy the stack, run:

pulumilocal up

You can view the deployed resources via:

awslocal sqs list-queues
awslocal s3 ls

Sending messages to SQS

Run the following command to send a message to the SQS queue:

awslocal sqs send-message --queue-url <QUEUE_URL> --message-body test

You then will be able to find a lastEvent.json file which contains the message sent to the SQS queue by running the following command:

awslocal s3 ls <BUCKET_URL>

License

This code is available under the Apache 2.0 license.