- Newest
- Most votes
- Most comments
Based on the validation error you're encountering, you're correct that you need to create a custom IAM role rather than using a service-linked role for the WhatsApp Business integration with Amazon Connect.
The error message indicates that the ARN format you're using doesn't match the expected pattern. The pattern requires a standard IAM role ARN format: arn:aws:iam::\d{12}:role/[a-zA-Z0-9+=,.@\-_]+. Your current ARN includes additional path segments (aws-service-role/connect.amazonaws.com/) which don't match this pattern.
To resolve this issue:
- Create a custom IAM role with a direct path (without the service-role path segments)
- For the trust policy, you'll need to allow the SMS and voice service to assume the role:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SMSVoice",
"Effect": "Allow",
"Principal": {
"Service": "sms-voice.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"aws:SourceAccount": "YOUR_ACCOUNT_ID"
}
}
}
]
}
For the permissions policy, you'll need to grant permissions for the role to import phone numbers and write events. The exact permissions will depend on your specific use case, but at minimum, you'll need permissions to handle the WhatsApp message events and integrate with Amazon Connect.
When creating this role, make sure:
- The role name follows the pattern of allowed characters: alphanumeric characters and these special characters: +=,.@-_
- The role is created directly under your account (not in a service-role path)
- The appropriate trust relationship is established to allow the necessary AWS services to assume the role
Sources
Validation error when trying to enable TwoWay Message with Amazon Connect in Pinpoint | AWS re:Post
WhatsAppBusinessAccountEventDestination - AWS End User Messaging Social
IAM policy validation check reference - AWS Identity and Access Management
