This CDK app deploys a series of serverless resources that allow an end-user to be notified via SMS when a Chatime store location is available for online ordering. To interface with the app the end-user sends SMS messages to a predefined Amazon Pinpoint SMS-enabled long code phone number.
- User -- SMS --> App: Send Canadian Postal Code (ex. M5J0A8)
- App -- SMS --> User: List of 3 closest Chatime store locations
- User -- SMS --> App: Store ID of desired store
- App -- SMS- -> User: Confirmation of monitoring
Another flow exists as well that happens behind the scenes that eventually results in a notification to the end-user.
- AWS Account
- Amazon Pinpoint w/ a Long code phone number with SMS enabled
- Docker
- Node.js
- CDK
If you have any trouble following these instructions, please see CDK Workshop for necessary background knowledge.
yarn install
Create a cdk.context.json
, and populate the Amazon Pinpoint Long code phone number as the originationNumber.
{
"originationNumber": "+19022019412"
}
yarn deploy
Once deployment has completed, you'll need to make note of the outputs.
Outputs:
chatime-notifier.smsrelaytopicoutput = arn:aws:sns:us-east-1:5************7:chatime-notifier-smsrelaytopic8589A353-BQ07VKBG82DL
In the AWS Management Console head over to Amazon Pinpoint and update the long code phone number so that Two-way SMS is enabled and the SNS topic is set to the output from the deployment above. See the following for an example: