
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
micro-kit-aws-queue
Advanced tools
This module implements a generic queue using Amazon SNS/SQS to allow micro-services to communicate without having to use AWS directly.
Note that all endpoints are asynchronous, returning a promise that gets resolved once the endpoint has completed.
Check to see if the given topic exists in SNS. If not, the topic is created.
The returned promise will be resolved with the ARN for the desired topic.
Publish the given message to the given topic (which is automatically assured)
message must be either a string or a JSON-compatible data structure.
Ensure the given queue exists in SQS. If not, the queue is created.
The returned promise will be resolved with the ARN for the queue.
Given a queue and topic name, subscribe the given queue to the given topic.
The returned promise will be resolved with the ARN for the subscription.
Regularly poll the given queue to see if any new messages have arrived. The parameters are as follows:
queue: the name of the queue to listen to.frequency: the desired polling frequency, in seconds.callback: an asynchronous function which takes a single parameter,
message, which is a string containing the message received from the
queue.Note that the callback function is asynchronous; when the returned promise is resolved, the message will be removed from the queue.
Stop polling for new messages on the given queue.
Sends message to the queue, queue must be name of the queue and message must be
either a string or a JSON-compatible data structure.
The returned promise will be resolved with the MessageId.
This module uses dotenv to store configuration details in an environment
file. It looks for a file named .env in the current directory, and loads the
following configuration settings from this file:
AWS_REGION: The desired AWS region string.AWS_ACCESS_KEY_ID: The access key to use for authentication.AWS_SECRET_ACCESS_KEY: The secret to use for authentication.SNS_ENDPOINT: An optional URL to use for accessing the SNS server. Leave
undefined to use the default AWS server.SQS_ENDPOINT: An optional URL to use for accessing the SQS server. Leave
undefined to use the default AWS server.The queuing module uses flow for type checking. To check that the code is all using the correct data types, type:
npm run flow
To strip the flow data type definitions from the source, type:
npm run build
This creates a plain-vanilla JS version of the module in the flow-typed
directory.
Note that you must type npm run build before running any of these tests.
To run the unit tests:
npm run unit
To run the integration tests:
npm run integration
You must have the AWS credentials set in the .env file for this to work.
To run Istanbul coverage:
npm run coverage
To check that the source matches the Javascript Standard Style rules:
npm run standard
Use this project, docker version or go https://github.com/p4tin/goaws
You can find more about docker here: https://docs.docker.com/engine/installation/
Docker version: All you need to do is run this commands Command to download the image:
docker pull pafortin/goaws
Command to run it on port 4100:
docker run -d --name goaws -p 4100:4100 pafortin/goaws
You can also run it with docker-compose. Create a file docker-compose.yml and insert this code:
awsQueue:
restart: always
container_name: awsQueue
image: pafortin/goaws
ports:
- "4100:4100"
Then run the file with command
docker-compose up
Now you have your own AWS SQS/SNS systems on http://localhost:4100
Still to do:
A gitlab-ci file for automated testing.
Docker configuration to run the tests on Docker.
Documentation needs update
FAQs
A generic queuing module using Amazon SNS/SQS.
We found that micro-kit-aws-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.