Bird
0
0

You wrote this AWS CLI command to subscribe an HTTP endpoint but get an error:

medium📝 Debug Q14 of 15
AWS - SNS and SQS
You wrote this AWS CLI command to subscribe an HTTP endpoint but get an error:
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic --protocol http --notification-endpoint http://example.com/notify
What is the most likely cause of the error?
AThe HTTP endpoint URL must use HTTPS, not HTTP
BThe topic ARN is invalid
CThe protocol should be 'https' instead of 'http'
DThe notification endpoint URL is missing a trailing slash
Step-by-Step Solution
Solution:
  1. Step 1: Check protocol requirements for HTTP endpoints

    AWS SNS requires HTTP endpoints to use HTTPS for security; HTTP URLs cause errors.
  2. Step 2: Validate the given URL and protocol

    The URL uses 'http://' which is not allowed; it must be 'https://'.
  3. Final Answer:

    The HTTP endpoint URL must use HTTPS, not HTTP -> Option A
  4. Quick Check:

    HTTP endpoints require HTTPS URL [OK]
Quick Trick: Use HTTPS URLs for HTTP/HTTPS SNS subscriptions [OK]
Common Mistakes:
  • Assuming HTTP URLs are accepted
  • Thinking trailing slash matters
  • Confusing protocol parameter values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes