Bird
0
0

Which of the following is the correct way to subscribe an SQS queue to an SNS topic using AWS CLI?

easy📝 Configuration Q12 of 15
AWS - SNS and SQS
Which of the following is the correct way to subscribe an SQS queue to an SNS topic using AWS CLI?
Aaws sns subscribe --topic-arn <topic-arn> --protocol sqs --notification-endpoint <queue-arn>
Baws sqs subscribe --topic-arn <topic-arn> --queue-url <queue-url>
Caws sns create-subscription --topic <topic-name> --queue <queue-name>
Daws sns add-queue --topic-arn <topic-arn> --queue-arn <queue-arn>
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct AWS CLI command

    The AWS CLI command to subscribe is 'aws sns subscribe'.
  2. Step 2: Check parameters for SQS subscription

    Use '--protocol sqs' and '--notification-endpoint' with the queue ARN.
  3. Final Answer:

    aws sns subscribe --topic-arn <topic-arn> --protocol sqs --notification-endpoint <queue-arn> -> Option A
  4. Quick Check:

    Subscribe SQS to SNS uses 'aws sns subscribe' with protocol sqs [OK]
Quick Trick: Subscribe SQS with 'aws sns subscribe' and protocol sqs [OK]
Common Mistakes:
  • Using 'aws sqs subscribe' which does not exist
  • Confusing queue URL with queue ARN
  • Using wrong command like 'aws sns add-queue'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes