Set up two-way SMS messaging for a phone number in AWS End User Messaging SMS
AWS End User Messaging SMS includes support for two-way SMS. When you set up two-way SMS, you can receive incoming messages from your customers. You can also use two-way messaging together with other AWS services, such as Lambda and Amazon Lex, to create interactive text messaging experiences.
When one of your customers sends a message to your phone number, the message body is sent to an Amazon SNS topic or Amazon Connect instance for processing.
Note
Two-way SMS is only available in certain countries and regions. For more information about two-way SMS support by country or region, see SMS and MMS country capabilities and limitations.
Amazon Connect for two-way SMS is available in the AWS Regions listed in Chat messaging: SMS subtype in the Amazon Connect Administrator Guide.
Two-way MMS is not supported but your phone number can still receive incoming SMS messages in response to an outbound MMS message.
- Two-way SMS messaging (Console)
-
To enable two-way SMS using the AWS End User Messaging SMS console, follow these steps:
Enable two-way SMS
Open the AWS End User Messaging SMS console at https://console.aws.amazon.com/sms-voice/
. -
In the navigation pane, under Configurations, choose Phone numbers.
-
On the Phone numbers page, choose a phone number.
-
On the Two-way SMS tab, choose the Edit settings button.
-
On the Edit settings page, choose Enable two-way message.
-
For Destination type, choose either Amazon SNS or Amazon Connect.
-
For Amazon SNS choose either New Amazon SNS topic or Existing Amazon SNS topic and then for Two-way channel role, choose either Choose existing IAM role or Use Amazon SNS topic policies.
-
New Amazon SNS topic – If you choose this option, AWS End User Messaging SMS creates a topic in your account. The topic is automatically created with all of the required permissions. For more information on Amazon SNS topics see Configuring Amazon SNS in the Amazon Simple Notification Service Developer Guide.
-
Existing Amazon SNS topic – If you choose this option, you must choose an existing Amazon SNS topic from the Incoming messages destination dropdown.
-
For Two-way channel role, choose either:
-
Choose existing IAM role – Choose an existing IAM policy to apply to the Amazon SNS topic. For example Amazon SNS policies see IAM policies for Amazon SNS topics.
-
Use Amazon SNS topic policies – The Amazon SNS topic requires the appropriate Amazon SNS topic policy to grant access to AWS End User Messaging SMS. For example Amazon SNS policies, see Topic policies for Amazon SNS topics.
-
-
-
For Amazon Connect, in Two-way channel role, choose Choose existing IAM roles.
-
In the Existing IAM roles drop down choose an existing IAM role as the message destination. For example IAM policies, see IAM policies for Amazon Connect .
-
-
-
Choose Save changes.
-
(Optional) If you've chosen Amazon Connect as the Destination type then in the Import Phone Number to Amazon Connect window:
-
For the Incoming messages destination dropdown choose the Amazon Connect instance that will receive incoming messages.
-
Choose Import Phone Number.
-
- Two-way SMS messaging (AWS CLI)
-
You can use the update-phone-number command to enable two-way SMS.
At the command line, enter the following command:
$
aws pinpoint-sms-voice-v2 update-phone-number \>
--phone-number-idPhoneNumber
\>
--two-way-enabledTrue
\>
--two-way-channel-arnTwoWayARN
\>
--two-way-channel-roleTwoChannelWayRole
In the preceding command, make the following changes:
-
Replace
PhoneNumber
with the PhoneNumberID or Amazon Resource Name (ARN) of the of the phone number. -
Replace
TwoWayARN
with the Amazon Resource Name (ARN) to receive the incoming SMS messages. For example Amazon SNS policies, see Topic policies for Amazon SNS topics. To set Amazon Connect as the inbound destination setTwoWayARN
toconnect.
. Replaceregion
.amazonaws.com.rproxy.goskope.comregion
with the AWS Region the Amazon Connect instance is hosted in. -
Replace
TwoChannelWayRole
with the Amazon Resource Name (ARN) of the IAM role to use. For example SNS permission policies, see IAM policies for Amazon SNS topics and for example Amazon Connect policies, see IAM policies for Amazon Connect. This parameter is only required if you choose to use IAM permission policies.
-