Bird
0
0

Given the following AWS SNS subscription code snippet, what will be the result when a message is published?

medium📝 Predict Output Q4 of 15
AWS - SNS and SQS
Given the following AWS SNS subscription code snippet, what will be the result when a message is published?
sns.subscribe({ Protocol: 'email', Endpoint: 'user@example.com' });
AMessage is sent as SMS to the user
BUser immediately receives the published message
CUser receives an email with a confirmation link
DLambda function is triggered
Step-by-Step Solution
Solution:
  1. Step 1: Understand email subscription behavior

    When subscribing an email endpoint, SNS sends a confirmation email first before delivering messages.
  2. Step 2: Analyze the code snippet

    The subscription uses 'email' protocol and a valid email address, so the user will get a confirmation email, not the message immediately.
  3. Final Answer:

    The user receives an email with a confirmation link -> Option C
  4. Quick Check:

    Email subscriptions require confirmation before messages [OK]
Quick Trick: Email subscriptions require confirmation before message delivery [OK]
Common Mistakes:
MISTAKES
  • Assuming immediate message delivery
  • Confusing SMS with email
  • Expecting Lambda trigger

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes