1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
There could be a few reasons due to which the “Subscribe-Success message” is not being received to SQS from an SNS Topic: SQS Access Policy permission issues: Please ensure you have set Principal to be the Amazon SNS service. For more details on the same, please refer to the below attached document: [+] https://docs.aws.amazon.com/sns/latest/dg/subscribe-sqs-queue-to-sns-topic.html#SendMessageToSQS.sqs.permissions
User permissions to appropriate topic and queue actions : Here there are two ways to control access to a topic or queue:
- Add policy to IAM user or group: Please refer to the sample below:
{
"Statement": [
{"Effect": "Allow",
"Action": "sns:Publish",
"Resource": "arn:aws:sns:us-east-2:1234567890**:MyTopic"
}
]
}
{
"Statement": [
{"Effect": "Allow",
"Action": [
"sqs:ReceiveMessage",
"sqs:DeleteMessage"
],
"Resource": [
"arn:aws:sqs:us-east-2:1234567890**:MyQueue1",
"arn:aws:sqs:us-east-2:1234567890**:MyQueue2"
]
}
]
}
- Adding a policy to a topic or queue: Please refer to the sample below:
{
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "1111222233**"
},
"Action": "sns:Publish",
"Resource": "arn:aws:sns:us-east-2:<Account-number>**:MyTopic"
}
]
}
{
"Statement": [
{"Effect": "Allow",
"Principal": {"AWS": "1111222233**"
},
"Action": [
"sqs:DeleteMessage",
"sqs:ReceiveMessage"
],
"Resource": [
"arn:aws:sqs:us-east-2:<Account-number>**:MyQueue"
]
}
]
}
You can refer to this document[+] for more details on the same [+] https://docs.aws.amazon.com/sns/latest/dg/subscribe-sqs-queue-to-sns-topic.html#SendMessageToSQS.iam.permissions
Relevant content
- asked 2 years ago
- asked 6 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago