Skip to content

Instantly share code, notes, and snippets.

View oxlb's full-sized avatar
🎯
Focusing

Onexlab (Munish Kapoor) oxlb

🎯
Focusing
View GitHub Profile
version: '3.0'
services:
localstack:
image: localstack/localstack:latest
environment:
- AWS_DEFAULT_REGION=us-east-1
- EDGE_PORT=4566
- SERVICES=sqs,sns
ports:
const { listSQS, createSqsQueue, sendMessage, getMessage} = require('./create.js');
//listSQS();
//createSqsQueue();
sendMessage('Welcome to onexlab please follow or subscribe to our Youtube and Medium');
getMessage();
const { SQS, listParams, createParams, msgParams, receiveParam, QUEUE_URL} = require('./util.js');
module.exports = {
listSQS: async () => {
SQS.listQueues(listParams, function(err, data) {
if (err) {
console.log("Error", err);
} else {
console.log("Success", data.QueueUrls);
}
// Load the AWS SDK for Node.js
const AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'ap-southeast-1'});
const config = {
endpoint: new AWS.Endpoint('http://localhost:4566'),
accessKeyId: 'na',
secretAccessKey: 'na',
region: 'ap-southeast-1'
@oxlb
oxlb / index.js
Last active March 25, 2021 16:20
const { listSQS, createSqsQueue} = require('./create.js');
createSqsQueue();
listSQS();
{
"name": "localstack-sqs",
"version": "1.0.0",
"description": "localstack sqs",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"onexlab",
{
"name": "localstack-sqs",
"version": "1.0.0",
"description": "localstack sqs",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"onexlab",
const { SQS, listParams, createParams } = require('./util.js');
module.exports = {
listSQS: async () => {
SQS.listQueues(listParams, function(err, data) {
if (err) {
console.log("Error", err);
} else {
console.log("Success", data.QueueUrls);
}
// Load the AWS SDK for Node.js
const AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'ap-southeast-1'});
const config = {
endpoint: new AWS.Endpoint('http://localhost:4566'),
accessKeyId: 'na',
secretAccessKey: 'na',
region: 'ap-southeast-1'
version: '3.0'
services:
localstack:
image: localstack/localstack:latest
environment:
- AWS_DEFAULT_REGION=ap-southeast-1
- EDGE_PORT=4566
- SERVICES=sqs