p4tin / goaws Goto Github PK
View Code? Open in Web Editor NEWAWS (SQS/SNS) Clone for Development testing
License: MIT License
AWS (SQS/SNS) Clone for Development testing
License: MIT License
When I run go get github.com/p4tin/GoAws
I get the following error:
can't load package: package github.com/p4tin/GoAws: case-insensitive import collision: "github.com/p4tin/GoAws/vendor/github.com/gorilla/context" and "github.com/p4tin/goaws/vendor/github.com/gorilla/context"
I'm on a mac and I assume this has something to do with the fact that the filesystem is case insensitive. Using go get github.com/p4tin/goaws
seemed to fix it.
Hi,
Thank you for the quality of this docker container, it's very useful.
If you try to push on a non existing queue, you will have a "panic" error and the process is not sending any result or error, letting all clients waiting for answers.
All the best.
Max
Just like queues and topics do not duplicate if you call the CreateQueue
/CreateTopic
with the same name multiple times, the Subscribe(topicArn, queueArn)
does not duplicate the subscription when using same topicArn and queueArn pair on actual aws, while goaws does not work like expected, it keeps adding the subscriptions.
This can be tested using the postman collection from the readme, executing the Subscribe multiple times and then checking the result of ListSubscriptions will show that there are multiple subscriptions with same topic/queue pairs.
Currently I am accessing (for changes) the Queue map without anything to stop multiple threads from changing it at the sametime (my bad).
SNS - Raw functionnality will be added in a later story. A topic that gets a message without a subscription will bitbucket the message after logging it.
I'm integrating the docker image into a docker-compose environment. I'm having trouble as SQS queues coming back from getqueueurl are all pointing to localhost, which is not correct in this environment and won't work as obviously my application is running on a different container.
A Raw subcription will deliver the message to a queue with the SNS headers stripped off.
When no queues or topics are added such as
Queues:
Topics:
or if those are left out entirely, goaws doesn't load the settings from the config file
When trying to GetQueueAttributes, goaws cannot find the que. However, when ListQueues, you can see the que is listed.
Here is an example request:
GET
http://aws:4100/queue/A15-QA-CONVENIENCE-CURRENCY-CHANGE?Action=GetQueueAttributes&AttributeName=ApproximateNumberOfMessages&Version=2012-11-05
With response:
[2017-03-06 12:32:28,944: INFO/MainProcess] Connected to emq://LOCAL:**@aws:4100//
[2017-03-06 12:32:28,956: ERROR/MainProcess] 400 Bad Request
[2017-03-06 12:32:28,956: ERROR/MainProcess] <ErrorResponse>
<Error>
<Type>Not Found</Type>
<Code>AWS.SimpleQueueService.NonExistentQueue</Code>
<Message>The specified ueue does not exist for this wsdl version.</Message>
<RequestId>00000000-0000-0000-0000-000000000000</RequestId>
</Error>
</ErrorResponse>
[2017-03-06 12:32:28,957: CRITICAL/MainProcess] Frequent restarts detected: RestartFreqExceeded('5 in 1s',)
Traceback (most recent call last):
File "/opt/python2.7/lib/python2.7/site-packages/celery/worker/consumer.py", line 285, in start
self._restart_state.step()
File "/opt/python2.7/lib/python2.7/site-packages/billiard/common.py", line 130, in step
raise self.RestartFreqExceeded("%r in %rs" % (R, self.maxT))
RestartFreqExceeded: 5 in 1s
A subscription to a topic will deliver messages to the specified Queue Arn.
listSubscriptionsByTopic()
does not return the subscription list.
After adding a few subscriptions using sns.subscribe(topicArn, sqsArn) I can get the list of subscriptions using listSubscriptions()
But if I want to only get subsciptions for a specific topic using the listSubscriptionsByTopic, the only data in result is ResponseMetadata, although I see I have subscriptions for the specified topicArn.
Hi! This is less of an issue with goaws and more of an issue with the Node.js aws-sdk. I am able to setup goaws correctly and pass all of the tests from the aws cli, however when using the local SNS ARN, I am receiving the following error:
Invalid parameter: TopicArn Reason: A local ARN must begin with arn:null, not arn:aws:sns:local:000000000000:topic1
My code is simple
AWS.config.update({
region: 'us-west-1'
});
var sns = new AWS.SNS();
var params = {
Message: 'some text'
TopicArn: 'arn:aws:sns:local:000000000000:topic1
};
sns.publish(params)
I am wondering if anyone has run into this issue before?!
I'm currently using a local DynamoDB Docker which supports the parameters below and as many of us do use SNS/SQS within other AWS services, would be nice to have these options so we could use GoAWS with other AWS local services.
-e AWS_ACCESS_KEY_ID=key -e AWS_SECRET_ACCESS_KEY=secret aws --region us-east-1 dynamodb --endpoint http://localhost:8000/
$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-103-generic
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pafortin/goaws latest 902625ed9b2a 5 months ago 14.46 MB
When I try to receive a message in the queue:
$ aws --endpoint-url http://localhost:4100 sqs receive-message --queue-url http://localhost:4100/test1
{
"Messages": []
}
but if I turn on debug logs, I can in part see the result:
$ aws --debug --endpoint-url http://localhost:4100 sqs receive-message --queue-url http://localhost:4100/test1
...
2017-01-13 14:22:21,582 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [POST]>
2017-01-13 14:22:21,592 - botocore.response - DEBUG - Response Body:
b' <ReceiveMessageResponse>\n <ReceiveMessageResult>\n <Message>\n <MessageId>cb599c62-1e89-42c0-87b8-63a1cbfaffb7</MessageId>\n <ReceiptHandle>cb599c62-1e89-42c0-87b8-63a1cbfaffb7#564933e2-a158-441a-b880-de6a490dfec8</ReceiptHandle>\n <MD5OfBody>9d3f5eaac3b1b4dd509f39e71e25f954</MD5OfBody>\n <Body>this is a test of the GoAws Queue messaging</Body>\n </Message>\n </ReceiveMessageResult>\n <ResponseMetadata>\n <RequestId>00000000-0000-0000-0000-000000000000</RequestId>\n </ResponseMetadata>\n </ReceiveMessageResponse>'
2017-01-13 14:22:21,594 - botocore.hooks - DEBUG - Event needs-retry.sqs.ReceiveMessage: calling handler <botocore.retryhandler.RetryHandler object at 0x7f1fa44a6b00>
2017-01-13 14:22:21,595 - botocore.retryhandler - DEBUG - No retry needed.
2017-01-13 14:22:21,597 - botocore.hooks - DEBUG - Event after-call.sqs.ReceiveMessage: calling handler <awscli.errorhandler.ErrorHandler object at 0x7f1fa47b4ba8>
2017-01-13 14:22:21,598 - awscli.errorhandler - DEBUG - HTTP Response Code: 200
{
"Messages": []
}
I thought the aws cli tools may require some particular format in the response that is not fully implemented, so I'll report it.
This will remove the Queue target for messages (a topic without subscriptions will still log the messages received to the log file.
All subscriptions associated with the delete topic will also be deleted.
Hi, I found some behavior with sqs that doesn't perfectly match in the emulator.
Specifically, when attempting to create a queue, if you try and create another queue with the same name, it normally would just give a 200, since the queue has already been created. But if you try and create a queue with the same name and a different retention period, on the GUI it shows this:
And on the command line, aws gives back a 400 in this case. goaws returns a 200 regardless.
Hi,
thanks for the project. I'm having an issue when receiving a message from SQS that was published by SNS:
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sns create-topic --name something-happend
{
"TopicArn": "arn:aws:sns:local:000000000000:something-happend"
}
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sqs create-queue --queue-name something-happened
{
"QueueUrl": "http://localhost:4100/queue/something-happened"
}
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sns subscribe --topic-arn arn:aws:sns:local:000000000000:something-happend --protocol sqs --notification-endpoint http://localhost:4100/queue/something-happened
{
"SubscriptionArn": "arn:aws:sns:local:000000000000:something-happend:41846153-40d1-42fc-af39-649b48bac0fb"
}
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sns publish --topic-arn arn:aws:sns:local:000000000000:something-happend --subject test --message test
{
"MessageId": "c91ac05a-be13-4a4a-9d04-8646274b0389"
}
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sqs receive-message --queue-url http://localhost:4100/something-happened
{
"Messages": [
{
"ReceiptHandle": "29f556cc-79b8-4f1e-b3b8-7d34e121a9b2#fa293d47-48ef-4402-8173-43f2df13b1d6",
"MessageId": "29f556cc-79b8-4f1e-b3b8-7d34e121a9b2",
"Body": "{\"Type\":\"Notification\",\"MessageId\":\"9f967ab3-dce0-4667-93f2-20032cb409d2\",\"TopicArn\":\"arn:aws:sns:local:000000000000:something-happend\",\"Subject\":\"\",\"Message\":\"\",\"TimeStamp\":\"2016-12-22T10:12:26:012Z\\n\"}",
"MD5OfBody": "b49c3ab34610f6ac60fa57006fe040ef"
}
]
}
sebastian:~/Development/message$ aws --endpoint-url http://localhost:4100 sqs receive-message --queue-url http://localhost:4100/something-happened
Problem is that Subject
and Message
is empty when receiving the message from SQS.
Am I doing something wrong or is that not implemented (yet)?
Seems like some of the calls from boto either send params differently or expect results in a different way. This ticket is to implement those boto idiosyncrasies without affecting the underlying code that works with other clients.
So far, this meets nearly all of my needs to a completely local development environment.
Thank you!
If you implement create-topic, it will then satisfy my needs to test everything, including infrastructure setup, locally.
I'm building our go chops now. We may implement this as a PR once we have confidence to do so.
Add the functionality to create an SNS topic.
At some point in the last months, the command in the Readme started giving this error on new machines:
$ go version
go version go1.2.1 linux/amd64
$ sudo GOPATH=/usr/local/src go get github.com/p4tin/goaws
package github.com/p4tin/goaws
imports github.com/p4tin/goaws
imports github.com/p4tin/goaws: no buildable Go source files in /usr/local/src/src/github.com/p4tin/goaws
To work around this, I now do:
go get -d github.com/p4tin/goaws
cd /usr/local/src/github.com/p4tin/goaws
git checkout 941608ca3f63bdace571268a241d6835002edd94
go get github.com/p4tin/goaws
as that commit was one that got installed on existing machines. This sequence correctly compiles and installs a goaws
binary.
This is the best emulator I could find, unfortunately I'm using Spring Boot and our API accepts only JSON. It seems you only support XML for SQS, so I get:
c.a.http.DefaultErrorResponseHandler : Unable to parse HTTP response (Invocation Id:0cd30c53-daa3-b1e8-4d99-cb64d5ee29fb) content to XML document 'Bad Request'
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:994)
etc.
I dunno if I'm doing something wrong, but in case you only support XML, I'd like to ask for json support. I would like to use this emulator so much. Thank you very much.
https://github.com/p4tin/goaws/blob/master/gosns/gosns.go#L276
Currently messages only published to SQS queues. Would be a lot more useful if there would be an ability to post messages to http endpoint.
In the case the goaws.yaml does not exist the app does not start correctly, provide san edefaults for everything so the app can start correctly
When Publish or Send Message is called log the messages to a log file that will be added to the environment yaml file (default to: ./goaws_messages.log). Logging messages should be able to be turned on and off in yaml.
The instructions to build & to "go get .." command give the error "Can't load package .": No buildable go files in (path). Can't figure out a way around this
It seems that the checksum generation of SQS message attributes is not implemented, correct? In
https://github.com/p4tin/goaws/blob/c4d80809ebe7f664226bd62fc60f355ae7a8b8ed/app/gosqs/gosqs.go#L131 the checksum of the message attributes is always computed from the static string GoAws
.
When using the java sdk when talking to SQS, sending a message to the queue fails because the client computes a different checksum for the message attributes than what goaws returns.
private static void sendMessageOperationMd5Check(SendMessageRequest sendMessageRequest, SendMessageResult sendMessageResult) {
String messageBodySent = sendMessageRequest.getMessageBody();
String bodyMd5Returned = sendMessageResult.getMD5OfMessageBody();
String clientSideBodyMd5 = calculateMessageBodyMd5(messageBodySent);
if(!clientSideBodyMd5.equals(bodyMd5Returned)) {
throw new AmazonClientException(String.format("MD5 returned by SQS does not match the calculation on the original request. (MD5 calculated by the %s: \"%s\", MD5 checksum returned: \"%s\")", new Object[]{"message body", clientSideBodyMd5, bodyMd5Returned}));
} else {
Map<String, MessageAttributeValue> messageAttrSent = sendMessageRequest.getMessageAttributes();
if(messageAttrSent != null && !messageAttrSent.isEmpty()) {
String clientSideAttrMd5 = calculateMessageAttributesMd5(messageAttrSent);
String attrMd5Returned = sendMessageResult.getMD5OfMessageAttributes();
if(!clientSideAttrMd5.equals(attrMd5Returned)) {
throw new AmazonClientException(String.format("MD5 returned by SQS does not match the calculation on the original request. (MD5 calculated by the %s: \"%s\", MD5 checksum returned: \"%s\")", new Object[]{"message attributes", clientSideAttrMd5, attrMd5Returned}));
}
}
}
}
com.amazonaws.AmazonClientException: MD5 returned by SQS does not match the calculation on the original request. (MD5 calculated by the message attributes: "3226c32921e2bcda84eed17654164acc", MD5 checksum returned: "b095c6d16871105acb75d59332513337")
at com.amazonaws.services.sqs.MessageMD5ChecksumHandler.sendMessageOperationMd5Check(MessageMD5ChecksumHandler.java:120) ~[aws-java-sdk-sqs-1.11.98.jar:na]
at com.amazonaws.services.sqs.MessageMD5ChecksumHandler.afterResponse(MessageMD5ChecksumHandler.java:80) ~[aws-java-sdk-sqs-1.11.98.jar:na]
at com.amazonaws.handlers.RequestHandler2Adaptor.afterResponse(RequestHandler2Adaptor.java:49) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.afterResponse(AmazonHttpClient.java:971) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) ~[aws-java-sdk-core-1.11.98.jar:na]
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:1689) ~[aws-java-sdk-sqs-1.11.98.jar:na]
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:1665) ~[aws-java-sdk-sqs-1.11.98.jar:na]
at com.amazonaws.services.sqs.AmazonSQSClient.sendMessage(AmazonSQSClient.java:1435) ~[aws-java-sdk-sqs-1.11.98.jar:na]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.sendMessage(AmazonSQSMessagingClientWrapper.java:168) ~[amazon-sqs-java-messaging-lib-1.0.2.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageProducer.sendInternal(SQSMessageProducer.java:111) ~[amazon-sqs-java-messaging-lib-1.0.2.jar:na]
at com.amazon.sqs.javamessaging.SQSMessageProducer.send(SQSMessageProducer.java:291) ~[amazon-sqs-java-messaging-lib-1.0.2.jar:na]
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:626) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:597) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:574) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:570) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:658) ~[spring-jms-4.3.7.RELEASE.jar:4.3.7.RELEASE]
SNS allows you to set platform specific data in the message body like so:
{
"default": "I am the default message.",
"sqs": "I am the message that if raw delivery is enabled"
}
Currently, goaws
doesn't handle platform specific data. Will be opening a fork to work on this, but also wanted to open an issue for more discussion.
Trying to post this json:
{
"id": "0aa432db-c1ee-40d2-aef9-4b80ff20010f",
"identityId": "0aa432db-c1ee-40d2-aef9-4b80ff20010f",
"name": "test",
"state": "test",
"createdAt": "2017-03-03T14:31:05.190Z",
"modifiedAt": "2017-03-03T14:31:05.190Z",
"repositoryName": "test",
"applicationId": "0aa432db-c1ee-40d2-aef9-4b80ff20010f"
}
aws --endpoint-url http://localhost:4100 sqs send-message --queue-url http://aws:4100/queue/local-queue1 --message-body "project_created" --message-attributes file://project_created.json
results in:
Invalid type for parameter MessageAttributes.id, value: 0aa432db-c1ee-40d2-aef9-4b80ff20010f, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.identityId, value: 0aa432db-c1ee-40d2-aef9-4b80ff20010f, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.name, value: test, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.state, value: test, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.createdAt, value: 2017-03-03T14:31:05.190Z, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.modifiedAt, value: 2017-03-03T14:31:05.190Z, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.repositoryName, value: test, type: <type 'unicode'>, valid types: <type 'dict'>
Invalid type for parameter MessageAttributes.applicationId, value: 0aa432db-c1ee-40d2-aef9-4b80ff20010f, type: <type 'unicode'>, valid types: <type 'dict'>```
Trying with:
```{"project_created": {
"id": "0aa432db-c1ee-40d2-aef9-4b80ff20010f",
"identityId": "0aa432db-c1ee-40d2-aef9-4b80ff20010f",
"name": "test",
"state": "test",
"createdAt": "2017-03-03T14:31:05.190Z",
"modifiedAt": "2017-03-03T14:31:05.190Z",
"repositoryName": "test",
"applicationId": "0aa432db-c1ee-40d2-aef9-4b80ff20010f"
}
}```
I get:
```Parameter validation failed:
Missing required parameter in MessageAttributes.project_created: "DataType"
Unknown parameter in MessageAttributes.project_created: "id", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "identityId", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "name", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "state", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "createdAt", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "modifiedAt", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "repositoryName", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType
Unknown parameter in MessageAttributes.project_created: "applicationId", must be one of: StringValue, BinaryValue, StringListValues, BinaryListValues, DataType```
What am I missing?
This works fine for me when accessed from localhost, but when you try to list-topics via docker to docker network connections, you get an empty array of topics.
> aws \
--endpoint-url http://my-docker-container:4100 \
sns \
create-topic \
--name some-cool-topic
> aws \
--endpoint-url http://my-docker-container:4100
sns \
list-topics
{
"Topics": []
}
I'm trying to debug the issue, and I can see that that ListTopics seems to have the right data, at some point afterwords the topics are getting lost.
Any ideas? My Go is not so good.
When attempting to install the package per the instructions, I get an error:
ubuntu@ubuntu-xenial:~/go$ go get github.com/p4tin/goaws
package github.com/p4tin/goaws: no buildable Go source files in /home/ubuntu/go/src/github.com/p4tin/goaws
I have very little knowledge of Go, but it looks like it was caused by commit 69bc0b0, which removed all the .go files from the project root.
Perhaps the installation instructions need to be updated?
If you create a subscription on a topic to a queue that does not exist, then try to publish to that topic GoAws seq faults as it tries to put the message on a queue message list that was never created. Fix is in progress and should be commited today with unit test!!
I am using AWSSDK 2.3.55.2 for .Net Framework
I have connected to the goaws.exe via the next C# code:
var request = new ReceiveMessageRequest
{
QueueUrl = "http://localhost:4100/queue/test_queue",
MaxNumberOfMessages = 5,
WaitTimeSeconds = 0
};var amazonSqsConfig = new AmazonSQSConfig(); amazonSqsConfig.ServiceURL = "http://localhost.fiddler:4100"; var amazonSqsClient = new AmazonSQSClient(new BasicAWSCredentials("x", "x"), amazonSqsConfig); Debugger.Break(); ReceiveMessageResponse response = amazonSqsClient.ReceiveMessageAsync(request).Result;
As a result, in the response I am expecting to get messages that are already in the test_queue, but instead I am receiving the next error:
{"The remote server returned an error: (400) Bad Request."}. Message: "The specified ueue does not exist for this wsdl version."
To figure out what happens and why I used fiddler to track the post request that AmazonSQSClient is sending. I figured out that AmazonSQSClient sends the next POST request:
POST http://localhost:4100/queue/development_brandupdatesmessage_v0 HTTP/1.1
User-Agent: aws-sdk-dotnet-45/2.3.55.2 .NET Runtime/4.0 .NET Framework/4.0 OS/6.2.9200.0 ClientAsync
Content-Type: application/x-www-form-urlencoded; charset=utf-8
host: localhost:4100
X-Amz-Date: 20170209T084928Z
X-Amz-Content-SHA256: 4fc28a78714c6b6ecd8bb88bcc81331e9d279dfe61f617b50574070e171cd4a5
Authorization: AWS4-HMAC-SHA256 Credential=x/20170209/us-east-1/sqs/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date, Signature=0abc1eb8930d27786ae49e60198124e80505ffabeb23335d9fb33e78aab877fd
Content-Length: 80
Connection: Keep-AliveAction=ReceiveMessage&MaxNumberOfMessages=5&Version=2012-11-05&WaitTimeSeconds=0
As we can see here in the request body there is no QueueUrl parameter. It is now in the request Url:
POST http://localhost:4100/queue/development_brandupdatesmessage_v0 HTTP/1.1
The bug is that goaws cannot handle this situation. For aws it is not a problem.
The fix would be if QueueUrl is not present in the request body, take it from the request url.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.