AWS - SNS and SQSWhich 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>Check Answer
Step-by-Step SolutionSolution:Step 1: Identify correct AWS CLI commandThe AWS CLI command to subscribe is 'aws sns subscribe'.Step 2: Check parameters for SQS subscriptionUse '--protocol sqs' and '--notification-endpoint' with the queue ARN.Final Answer:aws sns subscribe --topic-arn <topic-arn> --protocol sqs --notification-endpoint <queue-arn> -> Option AQuick 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 existConfusing queue URL with queue ARNUsing wrong command like 'aws sns add-queue'
Master "SNS and SQS" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - Why API Gateway matters - Quiz 1easy AWS Lambda - Event triggers for Lambda - Quiz 11easy Auto Scaling - Auto Scaling groups - Quiz 5medium Auto Scaling - Minimum, maximum, and desired capacity - Quiz 15hard DynamoDB - Creating a DynamoDB table - Quiz 14medium DynamoDB - Tables, items, and attributes - Quiz 5medium Elastic Load Balancing - Why load balancing matters - Quiz 1easy Elastic Load Balancing - SSL/TLS termination - Quiz 15hard RDS and Relational Databases - RDS pricing considerations - Quiz 8hard SNS and SQS - Sending and receiving messages - Quiz 9hard