The package adds AWS SNS to the Notification Center as a gateway.
- Install via Contao Manager or Composer (
composer require numero2/contao-notification_center-aws-sns
) - Run a database update via the Contao-Installtool or using the contao:migrate command.
- Create a
SMS (Amazon Web Services SNS)
gateway in the Notification Center
- Log in to the AWS Management Console
- Select a Supported Region from the top right of the console
- Switch to the
IAM
Service - Select
Policies
and chooseCreate policy
- Switch to the
JSON
tab and see the example below for a policy which can be used - Save the policy and switch to
Users
and clickCreate user
- In
Permissions options
selectAttach policies directly
and choose the Policy created before - Click
Next
and thenCreate user
- Back in the overview of users select the newly created user and switch to the tab
Security credentials
- In the section
Access keys
click the buttonCreate access key
- Choose the option
Other
and clickNext
, you can skip thedescription tag
and chooseCreate access key
- Make sure to save the generated
Access key
and theSecret access key
for later configuration in Contao - Click on
Done
to finish the process
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sns:Publish"
],
"Resource": [
"*"
]
}
]
}
AWS requires the recipient phone number to be in E.164 format (e.g +49123456789
). For this purpose this extension provides a custom Input validation
option called Phone number (E.164)
for the form generator.
For a better user experience we suggest to use a small JavaScript called International Telephone Input which makes sure the inserted number matches the format.