Step 3: Confirm the subscription
After you subscribe your endpoint, Amazon SNS will send a subscription confirmation message to
the endpoint. You should already have code that performs the actions described in Step 1 deployed to your endpoint. Specifically,
the code at the endpoint must retrieve the SubscribeURL
value from the
subscription confirmation message and either visit the location specified by
SubscribeURL
itself or make it available to you so that you can manually visit
the SubscribeURL
, for example, using a web browser. Amazon SNS will not send messages
to the endpoint until the subscription has been confirmed. When you visit the
SubscribeURL
, the response will contain an XML document containing an element
SubscriptionArn
that specifies the ARN for the subscription. You can also use
the Amazon SNS console to verify that the subscription is confirmed: The Subscription
ID will display the ARN for the subscription instead of the
PendingConfirmation
value that you saw when you first added the
subscription.