-
Notifications
You must be signed in to change notification settings - Fork 42
Description
When I try to publish to the topic I just created I'm getting a An error occurred (NotFound) when calling the Publish operation: Topic not found error.
Reproduction case:
Start the sns/sqs servers using docker-compose:
cd examples
docker-compose up
Publish to the existing test1 topic
AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 list-topics
{
"Topics": [
{
"TopicArn": "arn:aws:sns:us-east-1:1465414804035:test1"
}
]
}
AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 publish --topic-arn arn:aws:sns:us-east-1:1465414804035:test1 --message 'TEST'
{
"MessageId": "bcbded98-610f-4921-930b-286571588609"
}
This is all as expected - however when I create a new topic and publish to it I get
AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 create-topic --name new
{
"TopicArn": "arn:aws:sns:us-east-1:123456789012:new"
}
AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 list-topics
{
"Topics": [
{
"TopicArn": "arn:aws:sns:us-east-1:1465414804035:test1"
},
{
"TopicArn": "arn:aws:sns:us-east-1:123456789012:new"
}
]
}
AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar aws sns --endpoint-url http://localhost:9911 publish --topic-arn arn:aws:sns:us-east-1:123456789012:new --message 'TEST'
An error occurred (NotFound) when calling the Publish operation: Topic not found: arn:aws:sns:us-east-1:123456789012:new
Am I doing something wrong here? Is this happening because I don't have any subscriptions for this topic?
Ubuntu 14.04, docker 17.09.1-ce, compose 1.18.0, aws cli 1.14.38