Create a Lambda function that sends SMS via Pinpoint
This pattern demonstrates a Lambda function sending SMS via Pinpoint. The Lambda function has an associated IAM role that allows it to send SMS with the Pinpoint project.
1. You can use the Test button in the Lambda console to send an SMS to the specified destination number. Any test event will work with the default pattern code.
2. After you click the Test button, you'll receive an SMS on the mobile device.
Cleanup
1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"