Comments (2)
I figured out the issue is caused by the sdk v2 and a workaround is using the node sdk v3:
const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns');
const { SQSClient, ReceiveMessageCommand } = require('@aws-sdk/client-sqs');
async function publish(msg) {
const sns = new SNSClient({
region: 'us-east-1',
accessKeyId: 'x',
secretAccessKey: 'x',
endpoint: 'http://localhost:4200',
});
await sns.send(
new PublishCommand({
TopicArn: 'arn:aws:sns:us-east-1:100010001000:local-topic1',
Message: `Hello World, ${msg}}`,
}),
);
}
async function listen() {
const sqs = new SQSClient({
region: 'us-east-1',
accessKeyId: 'x',
secretAccessKey: 'x',
endpoint: 'http://localhost:4200',
});
const response = await sqs.send(
new ReceiveMessageCommand({
QueueUrl: 'http://localhost:4200/queue/local-queue3',
AttributeNames: ['All'],
MaxNumberOfMessages: 10,
MessageAttributeNames: ['All'],
WaitTimeSeconds: 5,
}),
);
return response;
}
async function run() {
await publish('test');
const result = await listen();
console.log(result);
}
run().then(() => console.log('done'));
from goaws.
I'm closing this, since it was only created FYI.
from goaws.
Related Issues (20)
- waitTimeSeconds being set to default even if developer called it with 0 HOT 1
- fatal error: concurrent map read and map write HOT 2
- What is the project state ? HOT 8
- Populate `Owner` tag in ListSubscriptionsByTopic Response HOT 5
- Health endpoint available but unused HOT 2
- c
- Feature Request: Configuration Hot-Reload HOT 1
- SNS Publish is content type json when body isnt json HOT 1
- Redrive policy MaxReceive logic is off by one
- Old release v1.1.2 is marked as latest HOT 10
- Optionally persisting topology (queues, topics and subscriptions) HOT 3
- Support SNS PublishBatch HOT 3
- How to set endpoint for local development using AWS SNS? HOT 1
- Release v0.4.3 arm64 is not support config file HOT 2
- SQS AWS JSON-1.0 gives bad request HOT 1
- "Bad Request - Action: " with GoLang github.com/aws/aws-sdk-go-v2/service/sqs v1.28.0 HOT 6
- Can we make a new release? 0.4.6 HOT 1
- Boto3 SNS Publish HOT 1
- Bad Request returned for SQS operations when using the .NET SDK HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goaws.