Skip to content

bug: Multi-account SNS topic ARNs use both account IDs #5551

Closed
@dpwdec

Description

@dpwdec

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running localstack in multi account mode using TEST_AWS_ACCOUNT_ID=000000000001,000000000002 the ARNs for topics created using aws sns CLI utility contain both account IDs rather than the account in which they were created.

For example listing topics after creation shows:

{
    "Topics": [
        {
            "TopicArn": "arn:aws:sns:eu-west-1:000000000001,000000000002:my-topic"
        }
    ]
}

Expected Behavior

Running the create-topics command should produce a topic with the following ARN:

{
    "TopicArn": "arn:aws:sns:eu-west-1:000000000001:my-topic"
}

How are you starting LocalStack?

With the localstack script

Steps To Reproduce

  1. Start a pro version localstack running instance running:
LOCALSTACK_API_KEY=********** TEST_AWS_ACCOUNT_ID=000000000001,000000000002 EDGE_PORT=4566 IMAGE_NAME=localstack/localstack:0.11.0 localstack start -d
  1. Create an SNS topics using the aws CLI:
AWS_ACCESS_KEY_ID=000000000001 aws --endpoint-url=http://localhost:4566 sns create-topic --name my-topic

Environment

- OS: macOS Catalina
- LocalStack: localstack/localstack:0.11.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions