Amazon SQS is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.
This is a workspace where you can find the following AWS SDK for JavaScript v3 SQS examples.
- Changing visibility(ChangeMessageVisibilityCommand)
- Create a queue(CreateQueueCommand)
- Create a dead letter queue(SetQueueAttributesCommand)
- Delete a queue(DeleteQueueCommand)
- Get a queue URL(GetQueueUrlCommand)
- List queues(ListQueuesCommand)
- Create long polling queue(CreateQueueCommand)
- Change time queue waits for messages(SetQueueAttributesCommand)
- Receive messages queue using long-polling support(ReceiveMessageCommand)
- Delete a message(ReceiveMessageCommand / DeleteMessageCommand)
- Send messages(SendMessageCommand)
Note: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see JavaScript ES6/CommonJS syntax.
-
Clone the AWS SDK Code Samples repo repo to your local environment. See the Github documentation for instructions.
-
Install ts-node or node the dependencies listed in the package.json.
Note: These include the client module for the AWS services required in these example, which is "@aws-sdk/client-sqs".
npm install node -g
cd javascriptv3/example_code/sqs
npm install
-
In your text editor, update user variables specified in the
Inputs
section of the sample file. -
Run sample code:
cd src
node [example name].js // For example, node sqs_changingvisibility.js