- Newest
- Most votes
- Most comments
To use a phone number from Account B in Account A, you need to follow a different approach than creating a pool directly with the shared phone number. Here's the correct process:
-
In Account B (the owner account), you need to share the phone number using AWS Resource Access Manager (RAM). This involves adding the phone number to a resource share.
-
In Account A (the destination account), you don't create a pool directly with the shared phone number. Instead, you need to use the shared phone number as it is.
-
To use the shared phone number in Account A, you would typically use it directly in your API calls or configurations, rather than trying to add it to a pool in Account A.
-
The resource policy you've set up in Account B looks correct, as it allows Account A to describe the phone number and send messages using it.
-
When you run the describe-phone-numbers command with the --owner SHARED parameter in Account A, and you can see the phone number, it confirms that the sharing is set up correctly.
-
To use the shared phone number in Account A, you would use it directly in operations like sending messages, without needing to create a pool or associate it with one.
If you need to use the phone number in a pool-like context in Account A, you might need to explore other options or consult with AWS support for the best approach, as directly adding a shared phone number to a pool in the destination account is not the standard procedure.
Remember, when using shared resources, there are often limitations on what operations can be performed on them in the destination account. The focus is typically on using the resource (like sending messages) rather than managing it (like adding it to pools) in the destination account.
Sources
Working with shared resources in AWS End User Messaging SMS - AWS End User Messaging SMS
Associate phone numbers to Amazon Connect contact flows | AWS re:Post
Hi,
You're encountering an issue with using a shared phone number from Account B in Account A. The error suggests that Account A cannot find the phone number resource when trying to create a pool. Let me help you resolve this.
The Issue
The problem appears to be with your resource policy in Account B. While you've granted permissions to describe the phone number and send messages, you haven't explicitly granted permission to associate the phone number with a pool in Account A.
Solution
- Update the resource policy in Account B to include the
sms-voice:AssociateOriginationIdentity
permission:
{ "Sid": "asdf", "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::{{accountA}}:root" ] }, "Action": [ "sms-voice:DescribePhoneNumbers", "sms-voice:SendTextMessage", "sms-voice:SendVoiceMessage", "sms-voice:AssociateOriginationIdentity" ], "Resource": "arn:aws:sms-voice:us-east-2:{{accountB}}:phone-number/phone-abcdefabcdef" }
- Create the pool first in Account A without specifying the origination identity:
aws pinpoint-sms-voice-v2 create-pool --iso-country-code US --message-type TRANSACTIONAL --name YourPoolName
- Then associate the phone number with the pool:
aws pinpoint-sms-voice-v2 associate-origination-identity --pool-id pool-12345 --origination-identity arn:aws:sms-voice:us-east-2:000011112222:phone-number/phone-abcdefabcdef
This two-step approach often works better when dealing with cross-account resources.
Additional Verification
You can verify the phone number is properly shared by running:
aws pinpoint-sms-voice-v2 describe-phone-numbers --phone-number-id phone-abcdefabcdef
If the sharing is set up correctly, this command should return details about the phone number from Account A.
Let me know if you encounter any other issues with this approach!
- AssociateOriginationIdentity is not a supported action for resource share.
- Cannot create a pool without --origination-identity
Additional verification Yes i can see the number. I can even send a message from it using CLI
aws pinpoint-sms-voice-v2 send-text-message --origination-identity arn:aws:sms-voice:us-east-2:{{accountB}}:phone-number/phone-phone-abcdefabcdef --destination-phone-number +{{phone}} --message-type TRANSACTIONAL --message-body "Hi Jared!"
What I would really like to do is send a message from the SNS console and have it default to using the phone number from accountB. Not finding any leads on how to do that. I thought using a pool would be the right way to do that.
Relevant content
- asked a year ago
On point 3.
I can use the number with
aws pinpoint-sms-voice-v2 send-text-message ...
. However I'm not sure how to use the phone number from Account B as the SNS send-message default. That doesn't appear to be an API option.