- DarkLight
AWS Pinpoint SMS
- DarkLight
Amazon Pinpoint is a service offered by AWS. Pinpoint can be used for customer engagement over multiple messaging channels like push notifications, Emails, SMS text messages, or voice messages.
Prerequisites
Ensure that the following details are present before you proceed further:
AWS Account
The AWS Account with IAM permissions to create Amazon Pinpoint projects, Lambda functions, and more
Amazon Pinpoint Project to manage SMS activities
AWS Application ID
AWS Pinpoint supports sending both one-way and two-way transactional and promotional text messages using long codes or short codes.
To create a new Pinpoint project in AWS with SMS Channel enabled, click Create a project.
In a Create a project screen, enter the Project name and click Create.
The AWS project is created successfully.
Click Project Settings and select the SMS and voice option to obtain a dedicated number.
Complete the registration process. For example, Toll-free registrations.
Note:
The 10DLC registration process is mandatory for A2P messaging.
Click Create registration and provide the required details.
In the Create registration screen, enter the following details:
Enter Registration friendly name.
Select Registration type.
Click Request originator for long code or toll-free number.
Note:
Some SMS options, such as dedicated origination numbers or sender IDs, are unavailable until you contact AWS Support.
Select Country from the dropdown list and click Next.
Select SMS from Number capabilities.
Select <5000 from Estimated monthly SMS message volume per month. It is an optional field.
Select Local from Company headquarters. It is an optional field.
Select Yes from Two-way messaging.
Select the Toll-free option from Originator type.
Review the details and click Request to proceed.
Credentials
Retrieve the Access Key and Secret Key of the AWS account that has access to the project. Alternatively, you can use an assumed Role to access the project.
Note:
The role-based authentication is only applicable when the Campaign Manager product is installed/hosted in the AWS EC2 instance.
The AWS Region where the Pinpoint project is accessible for SMS service.
The following details are required:
AWS App ID.
AWS Access Key with access to the created project.
AWS Secret Key which validates the user to access the project.
AWS Region
For example, us-east-1
SMS API URL
For example, https://<IP/ServerName>/OptumDEVAECHttpSmsReceiverApi/API
Enabling 2-way SMS
Mapping Amazon SNS (Simple Notification Service) to Amazon Pinpoint involves integrating two services to work together.
Select Topics from the navigation pane and click Create topic.
Select Standard as Type and enter a Name for a topic. Click Create to proceed further.
The Topic is created successfully. In the Topic page, click Create subscription to create a subscription for an SNS topic.
To configure the subscription details, perform the following:
Topic ARN: Select the Amazon Resource Name (ARN) of the topic you want to subscribe to.
Protocol: Select the type of endpoint from the dropdown list that you want to use. For example, HTTPS.
Endpoint: Enter the endpoint URL.
Click Create subscription after configuring the details.
The Details page appears once the subscription is created.
Provide the details of the company that are registering this toll-free number.
Note:
The subscription status should change from Pending to Confirmed to receive messages to the endpoint.
Delivery Status
Amazon Pinpoint provides detailed tracking of message delivery status.
When you send SMS through Amazon Pinpoint, it is first processed by the service and then sent to the receiver. As the message is processed, events are generated within Amazon Pinpoint which includes message sent, delivered and more. The SMS events generated by Amazon Pinpoint can be streamed using Amazon Kinesis Data Streams. Besides, you need to create a Lambda JavaScript project that runs on the node.js platform to consume event data from the stream.
The Pinpoint project sends SMS event data to the data stream. The data stream, in turn, triggers the lambda script.
In the lambda script, an API call to SMS API should be made with SMS event data. For Example, https://xxxxxxx/HttpSmsReceiverApi/api/awspinpoint/DeliveryStatus
Configure the lambda:
Port: Enter the port for the application to communicate with the Campaign Manager component. If http port, use 80; if secured https, use 443.
Host: Enter the host server name / FQDN where the Campaign Manager core is installed.
Path: Enter the URL for the Tenant HTTPSMSReceiverAPI.
Configure the required lambda roles and permissions.