

# Getting started with Amazon SNS SMS
Getting started

**Important**  
The Amazon SNS SMS Developer Guide has been updated. Amazon SNS has integrated with [AWS End User Messaging SMS](https://docs.aws.amazon.com/sms-voice/latest/userguide/what-is-service.html) for the delivery of SMS messages. This guide contains the latest information on how to create, configure, and manage your Amazon SNS SMS messages.

This topic guides you through managing your SMS sandbox and configuring IAM and resource-based policies to grant Amazon SNS the necessary permissions for accessing and utilizing the AWS End User Messaging SMS APIs. 

## Prerequisites


Amazon SNS recommends updating your IAM policy to include the following actions to ensure comprehensive control and visibility over your Amazon SNS resources:
+ [`AmazonSNSFullAccess`](security-iam-awsmanpol.md#security-iam-awsmanpol-AmazonSNSFullAccess)
+ [`AmazonSNSReadOnly`](security-iam-awsmanpol.md#security-iam-awsmanpol-AmazonSNSReadOnlyAccess) 

# Using the Amazon SNS SMS sandbox
SMS sandbox

Newly created Amazon SNS SMS accounts are automatically placed into the SMS sandbox to ensure the security of both AWS customers and recipients by mitigating the risk of fraud and abuse. This environment serves as a secure space for testing and development purposes. While operating within the SMS sandbox, you have access to all Amazon SNS features but are subject to certain limitations:
+ You can only send SMS messages to verified destination phone numbers.
+ You can have up to 10 verified destination phone numbers.
+ You can delete destination phone numbers only after a minimum of 24 hours have passed since verification, or the last verification attempt.

Once your account transitions out of the sandbox, these restrictions are removed, and you can send SMS messages to any recipient.

## First steps


New Amazon SNS SMS accounts are placed into an SMS sandbox. Use the following steps to create and manage phone numbers in your sandbox, create origination numbers and sender IDs, and register your company.

1. Add a **destination phone number** to the SMS sandbox. For details on adding, managing and moving phone numbers out of the Amazon SNS SMS sandbox, see [Adding and verifying phone numbers in the Amazon SNS SMS sandbox](sns-sms-sandbox-verifying-phone-numbers.md).

1. Create an **origination identity** that your recipients see on their devices when you send them an SMS message. To learn more about origination identities, including the different types you can use, see the [Origination identities for Amazon SNS SMS messages](channels-sms-originating-identities.md) documentation.

1. **Register** your company. Some countries require you to register your company's identity to be able to purchase phone numbers or sender IDs and review the messages you send to recipients in their country. For information on which countries require registration, see [Supported countries and regions for SMS messaging with AWS End User Messaging SMS](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) in the *AWS End User Messaging SMS User Guide*.

1. **Send** your messages to a topic or mobile phone. For more information, see [Sending SMS messages using Amazon SNS](sms_sending-overview.md).

# Adding and verifying phone numbers in the Amazon SNS SMS sandbox
Adding and verifying phone numbers

Before you can start sending SMS messages from your AWS account while in the [SMS sandbox](sns-sms-sandbox.md), you must complete the following setup steps. This ensures that your account is ready for SMS messaging and that your destination phone numbers are properly verified.

1. Create an **[origination ID](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-number-types.html)**. Similar to accounts outside of the SMS sandbox, an origination ID is necessary before you can send SMS messages to recipients in some countries or regions.

1. Add the **destination phone numbers** you want to send messages to within the SMS sandbox.

1. Verify the **phone numbers** to ensure that the destination phone numbers are valid for use in your SMS messages.

**Add and verify destination phone numbers**

1. Sign in to the [Amazon SNS console](https://console.aws.amazon.com/sns/home).

1. In the console menu, choose a [region that supports SMS messaging](https://docs.aws.amazon.com/general/latest/gr/end-user-messaging.html).

1. In the navigation pane, choose **Text messaging (SMS)**.

1. In the **Sandbox destination phone numbers** section, select **Add phone number**.

1. Under **Destination details**, provide the following information, and then select **Add phone number**:
   + **Country code** and **phone number** of the destination.
   + The **language** you want the verification message to be sent in.

1. After adding the phone number, Amazon SNS will send an OTP to the provided destination phone number. This OTP is required for verification.

1. You will receive the OTP as a standard SMS message on the **destination phone number** you provided.
   + If you don’t receive the OTP within 15 minutes, select **Resend verification** code in the Amazon SNS console.
   + You can resend the OTP up to five times in a 24-hour period.

1. Once you receive the OTP, enter it in the **Verification code** box and select **Verify phone number**.

1. Check the **verification status**.
   + After successfully verifying the phone number, the phone number and its verification status will appear in the **Sandbox destination phone numbers** section.
   + If the status is **Pending**, the verification was unsuccessful. This may happen if, for example, you didn’t enter the country code correctly.
   + You can only delete pending or verified phone numbers after 24 hours or more have passed since the last verification attempt.

1. If you wish to use the same destination phone number in other regions, **repeat** the previous steps for each region where you intend to use it.

## Troubleshooting non-receipt of an OTP text
Troubleshooting an OTP text

Troubleshoot common problems that may prevent a phone number from receiving OTP texts.
+ **Amazon SNS SMS spending limit:** If your AWS account has exceeded the spending limit for sending SMS messages, further messages, including OTP texts, might not be delivered until the limit is increased or the billing issue is resolved.
+ **Phone number not opted in for SMS notifications:** In some countries or regions, recipients must opt in to receive SMS messages from short codes, which are commonly used for OTP texts. If the recipient's phone number is not opted in, they will not receive the OTP text.
+ **Carrier restrictions or filtering:** Some mobile carriers may have restrictions or filtering mechanisms in place that prevent delivery of certain types of SMS messages, including OTP texts. This could be due to security policies or anti-spam measures implemented by the carrier.
+ **Invalid or incorrect phone number:** If the phone number provided by the recipient is incorrect or invalid, the OTP text will not be delivered.
+ **Network issues:** Temporary network issues or outages could prevent the delivery of SMS messages, including OTP texts, to the recipient's phone.
+ **Delayed delivery:** In some cases, SMS messages may experience delays in delivery due to network congestion or other factors. The OTP text may eventually be delivered, but it could be delayed beyond the expected timeframe.
+ **Account suspension or termination:** If there are issues with your AWS account, such as non-payment or violation of AWS terms of service, Amazon SNS messaging capabilities, including OTP texts, may be suspended or terminated.

# Deleting phone numbers from the Amazon SNS SMS sandbox
Deleting phone numbers

You can delete both pending and verified destination phone numbers from the [SMS sandbox](sns-sms-sandbox.md).

**Important**  
You can only delete a phone number 24 hours after [verifying the phone number](sns-sms-sandbox-verifying-phone-numbers.md), or 24 hours after your last verification attempt.

**To delete destination phone numbers from the SMS sandbox**

1. Sign in to the [Amazon SNS console](https://console.aws.amazon.com/sns/home).

1. In the console menu, choose a [region that supports SMS messaging](https://docs.aws.amazon.com/general/latest/gr/end-user-messaging.html) where you added a destination phone number.

1. In the navigation pane, select **Text messaging (SMS)**.

1. On the **Mobile text messaging (SMS)** page, navigate to the **Sandbox destination phone numbers** section.

1. Choose the specific phone number you want to delete, and then choose **Delete phone number**.

1. To confirm that you want to delete the phone number, enter **delete me**, and then choose **Delete**.

   Ensure that 24 hours or more have passed since you verified or attempted to verify the destination phone number before proceeding with the deletion.

1. Repeat these steps in each Region where you added the destination phone number and no longer plan to use it.

# Moving out of the Amazon SNS SMS sandbox


Moving your AWS account out of the [SMS sandbox](sns-sms-sandbox.md) requires that you first add, verify, and test destination phone numbers. After doing this, create a case with AWS Support.

**To request that your AWS account is moved out of the SMS sandbox**

1. **Verify phone numbers**

   1. While your AWS account is in the SMS sandbox, open the [Amazon SNS console](https://console.aws.amazon.com/sns/home).

   1. In the navigation pane, under Mobile, choose **Text messaging (SMS)**.

   1. In the Sandbox destination phone numbers section, [add and verify](sns-sms-sandbox-verifying-phone-numbers.md) one or more destination phone numbers. This verification ensures you can successfully send and receive messages.

1. **Test SMS publishing**

   1. Confirm that you are able to send and receive messages to at least one verified phone number. For more detailed instructions on how to publish SMS messages, see [Publishing SMS messages to a mobile phone using Amazon SNS](sms_sending-overview.md#sms_publish-to-phone).

1. **Initiate sandbox edit**

   1. On the Amazon SNS console's **Mobile text messaging (SMS)** page, under **Account information**, choose **Exit SMS sandbox**. This action redirects you to the [Amazon Support Center](https://support.console.aws.amazon.com/support/home?#/case/create?issueType=service-limit-increase) and automatically creates a support case with the **Service quota increase** option selected.

1. **Fill out the form**

   1. In the support form under **Service quota increase**, do the following:

     1. Choose choose **SNS Text Messaging** as the service.

     1. Provide the **website URL** or **app name** from which you intend to send SMS messages.

     1. Specify the type of messages you will send: **One Time Password**, **Promotional**, or **Transactional**.

     1. Choose the **AWS Region** from which you will send SMS messages.

     1. List the **countries** or **regions** where you plan to send SMS messages.

     1. Describe how your customers **opt-in to receive messages**.

     1. Include any **message templates** you intend to use.

1. **Specify quota and Region**

   1. Under **Requests**, do the following:

     1. Choose the **AWS Region** where you want to move your AWS account.

     1. Choose **General Limits** for **Resource Type**.

     1. Choose **Exit SMS Sandbox** for **Quota**.

     1. (Optional) To request additional increases or other adjustments, choose **Add another request** and specify the necessary details.

     1. For **New quota value**, enter the **limit** in USD you are requesting.

1. **Additional details**

   1. In the **Case description**, provide any additional details relevant to your request.

   1. Under **Contact options**, choose your **preferred contact language**.

1. **Submit the request**

   1. Choose **Submit** to send your request to Support.

The Support team provides an initial response to your request within 24 hours.

To prevent our systems from being used to send unsolicited or malicious content, we consider each request carefully. If we can, we will grant your request within this 24-hour period. However, if we need additional information from you, it might take longer to resolve your request.

If your use case doesn't align with our policies, we might be unable to grant your request.