For example:
const topic = new sst.aws.SnsTopic("Topic");
const queue = new sst.aws.Queue("Queue");
topic.subscribeQueue("QueueSubscriber", queue.arn);
.. adds the following policy, which would permit adding messages from any AWS account.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"s3.amazonaws.com",
"events.amazonaws.com",
"sns.amazonaws.com"
]
},
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:us-east-2:xxxxxxxxxxx:sst-zzzzzz-QueueQueue-yyyyyyy"
}
]
}
For example:
.. adds the following policy, which would permit adding messages from any AWS account.