This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=us-east-1 | |
- EDGE_PORT=4566 | |
- SERVICES=sqs,sns | |
ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { listSQS, createSqsQueue, sendMessage, getMessage} = require('./create.js'); | |
//listSQS(); | |
//createSqsQueue(); | |
sendMessage('Welcome to onexlab please follow or subscribe to our Youtube and Medium'); | |
getMessage(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { listSQS, createSqsQueue} = require('./create.js'); | |
createSqsQueue(); | |
listSQS(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "localstack-sqs", | |
"version": "1.0.0", | |
"description": "localstack sqs", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [ | |
"onexlab", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "localstack-sqs", | |
"version": "1.0.0", | |
"description": "localstack sqs", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [ | |
"onexlab", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=ap-southeast-1 | |
- EDGE_PORT=4566 | |
- SERVICES=sqs |