aws --endpoint-url=http://localhost:4566 s3 mb s3://mytestbucket
make_bucket: mytestbucket
aws --endpoint-url=http://localhost:4566 s3 ls
2006-02-03 08:45:09 mytestbucket
aws --endpoint-url=http://localhost:4566 s3 cp /tmp/mongo.log s3://mytestbucket
upload: ../../../../tmp/mongo.log to s3://mytestbucket/mongo.log
aws --endpoint-url=http://localhost:4566 s3 ls s3://mytestbucket
2017-04-05 01:18:39 4789 mongo.log
aws --endpoint-url=http://localhost:4566 s3 rm s3://mytestbucket/mongo.log
delete: s3://mytestbucket/mongo.log
aws --endpoint-url=http://localhost:4566 s3 ls s3://mytestbucket
aws --endpoint-url=http://localhost:4566 sns list-topics
{
"Topics": []
}
aws --endpoint-url=http://localhost:4566 sns create-topic --name test-topic
{
"TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic"
}
aws --endpoint-url=http://localhost:4566 sns list-topics
{
"Topics": [
{
"TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic"
}
]
}
(use any random email)
aws --endpoint-url=http://localhost:4566 sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:test-topic --protocol email --notification-endpoint [email protected]
{
"SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:test-topic:5aacffbe-ccf7-40d5-be97-c55af7392935"
}
aws --endpoint-url=http://localhost:4566 sns list-subscriptions
{
"Subscriptions": [
{
"Owner": "",
"Endpoint": "[email protected]",
"Protocol": "email",
"TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic",
"SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:test-topic:5aacffbe-ccf7-40d5-be97-c55af7392935"
}
]
}
aws --endpoint-url=http://localhost:4566 sns publish --topic-arn arn:aws:sns:us-east-1:123456789012:test-topic --message 'Test Message!'
{
"MessageId": "n/a"
}
aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name test_queue
{
"QueueUrl": "http://localhost:4566/123456789012/test_queue"
}
aws --endpoint-url=http://localhost:4566 sqs list-queues
{
"QueueUrls": [
"http://localhost:4566/123456789012/test_queue"
]
}
aws --endpoint-url=http://localhost:4566 sqs send-message --queue-url http://localhost:4566/123456789012/test_queue --message-body 'Test Message!'
{
"MD5OfMessageBody": "df69267381a60e476252c989db9ac8ad",
"MessageId": "a6ed436b-076a-0d8d-73e1-cc3291a19c28"
}
aws --endpoint-url=http://localhost:4566 sqs receive-message --queue-url http://localhost:4566/123456789012/test_queue
{
"Messages": [
{
"Body": "Test Message!",
"Attributes": {
"ApproximateFirstReceiveTimestamp": "1.49138149959e+12",
"SenderId": "AIDAIT2UOQQY3AUEKVGXU",
"ApproximateReceiveCount": "1",
"SentTimestamp": "1.49138142195e+12"
},
"ReceiptHandle": "xuazrzyjcgpgzpzlxlyxmujbgzfkswixjkywshturlylrfwzyccutlumitgduyzddwkaoypcmswlkxrrjghdyztfewrpmkxdufptyketrfumwzicmggogdbaucwztvorplibccpfhirmalnixvfbklzrgncpisdsiuiajqwefxueqhuygfibmgqwx",
"MD5OfBody": "df69267381a60e476252c989db9ac8ad",
"MessageId": "a6ed436b-076a-0d8d-73e1-cc3291a19c28"
}
]
}
If you do this many times, the process seems to sleep. May be to simulate the message visibility? Here are 2 consecutive runs.
real 0m15.185s
user 0m0.291s
sys 0m0.158s
real 0m26.829s
user 0m0.291s
sys 0m0.167s
aws --endpoint-url=http://localhost:4566 sqs delete-message --queue-url http://localhost:4566/123456789012/test_queue --receipt-handle 'yugzzebhnnksfuvbjlibfnlejyqbulxqfegsnrgafjeabxaatxbmeiyfkfliedslohseosgjwkxhdzllpudhccjhorpkwbgjgyzeyzjwkfvqflathnvsmugeyevbqmfyqanuxetvdhcetseuwzrqpexogzggznndxmbqowtlalvqtffntdahhihel'
aws sqs --endpoint-url=http://localhost:4566 purge-queue --queue-url http://localhost:4566/000000000000/test_queue