Written in Go this is a clone of the AWS SQS/SNS systems. This system is designed to emulate SQS ans SNS in a local environment so developers can test their interfaces without having to connect the the AWS Cloud and possibly incurring the expense, or even worse actually write to production topics/queues by mistake. If you see any problems or would like to see a new feature, please open an issue here in github. As well, I will logon to Gitter so we can discuss your deployment issues or the weather.
- ListQueues
- CreateQueue
- GetQueueAttributes (Always returns all attributes - depth and arn are set correctly others are mocked)
- GetQueueUrl
- SendMessage
- ReceiveMessage
- DeleteMessage
- PurgeQueue
- Delete Queue
- ListTopics
- CreateTopic
- Subscribe (raw)
- ListSubscriptions
- Publish
- DeleteTopic
- Subscribe
- Unsubscribe
- ListSubscriptionsByTopic
- Read config file
- Implement flag to chose configuration type
- Process Queue Creations
- Process Topic Creations
- Process Create Subscriptions
go get github.com/p4tin/GoAws
Build
cd to GoAws directory
go build .
Run
./goaws (by default goaws listens on port 4100 but you can change it in the goaws.yaml file to another port of your choice)
Get it
docker pull pafortin/goaws
run
docker run -d --name goaws -p 4100:4100 pafortin/goaws
You can test that your installation is working correctly in one of two ways:
-
Usign the postman collection, use this link to import it. As well the Environment variable for the collection should be set as follows: URL = https://localhost:4100/.
-
by using the AWS cli tools (download link) here are some samples, you can refer to the aws cli tools docs for further information.
- aws --endpoint-url https://localhost:4100 sqs create-queue --queue-name test1
{
"QueueUrl": "https://localhost:4100/test1"
}
- aws --endpoint-url https://localhost:4100 sqs list-queues
{
"QueueUrls": [
"https://localhost:4100/test1"
]
}
- aws --endpoint-url https://localhost:4100 sqs send-message --queue-url https://localhost:4100/test1 --message-body "this is a test of the GoAws Queue messaging"
{
"MD5OfMessageBody": "9d3f5eaac3b1b4dd509f39e71e25f954",
"MD5OfMessageAttributes": "b095c6d16871105acb75d59332513337",
"MessageId": "66a1b4f5-cecf-473e-92b6-810156d41bbe"
}
- aws --endpoint-url https://localhost:4100 sqs receive-message --queue-url https://localhost:4100/test1
{
"Messages": [
{
"Body": "this is a test of the GoAws Queue messaging",
"MD5OfMessageAttributes": "b095c6d16871105acb75d59332513337",
"ReceiptHandle": "66a1b4f5-cecf-473e-92b6-810156d41bbe#f1fc455c-698e-442e-9747-f415bee5b461",
"MD5OfBody": "9d3f5eaac3b1b4dd509f39e71e25f954",
"MessageId": "66a1b4f5-cecf-473e-92b6-810156d41bbe"
}
]
}
- aws --endpoint-url https://localhost:4100 sqs delete-message --queue-url https://localhost:4100/test1 --receipt-handle 66a1b4f5-cecf-473e-92b6-810156d41bbe#f1fc455c-698e-442e-9747-f415bee5b461
No output
- aws --endpoint-url https://localhost:4100 sqs receive-message --queue-url https://localhost:4100/test1
No output (No messages in Q)
- aws --endpoint-url https://localhost:4100 sqs delete-queue --queue-url https://localhost:4100/test1
No output
- aws --endpoint-url https://localhost:4100 sqs list-queues
No output (There are no Queues left)
(Topics are created hard coded (until create-topic is implemented)
- aws --endpoint-url https://localhost:4100 sns list-topics
{
"Topics": [
{
"TopicArn": "arn:aws:sns:local:000000000000:topic1"
},
{
"TopicArn": "arn:aws:sns:local:000000000000:topic2"
}
]
}