AWS::Connect::PhoneNumber - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Claims a phone number to the specified Amazon Connect instance or traffic distribution group.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::Connect::PhoneNumber", "Properties" : { "CountryCode" : String, "Description" : String, "Prefix" : String, "SourcePhoneNumberArn" : String, "Tags" : [ Tag, ... ], "TargetArn" : String, "Type" : String } }


Type: AWS::Connect::PhoneNumber Properties: CountryCode: String Description: String Prefix: String SourcePhoneNumberArn: String Tags: - Tag TargetArn: String Type: String



The ISO country code.

Required: No

Type: String

Pattern: ^[A-Z]{2}

Update requires: Replacement


The description of the phone number.

Required: No

Type: String

Minimum: 1

Maximum: 500

Update requires: No interruption


The prefix of the phone number. If provided, it must contain + as part of the country code.

Pattern: ^\\+[0-9]{1,15}

Required: No

Type: String

Pattern: ^\+[0-9]{1,15}

Update requires: Replacement


The claimed phone number ARN that was previously imported from the external service, such as Amazon Pinpoint. If it is from Amazon Pinpoint, it looks like the ARN of the phone number that was imported from Amazon Pinpoint.

Required: No

Type: String

Update requires: Replacement


The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption


The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution group that phone numbers are claimed to.

Required: Yes

Type: String

Pattern: ^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:(instance|traffic-distribution-group)/[-a-zA-Z0-9]*$

Update requires: No interruption


The type of phone number.

Required: No

Type: String


Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the phone number. For example:

{ "Ref": "myPhoneNumber" }

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The phone number, in E.164 format.


The Amazon Resource Name (ARN) of the phone number.


Specify a phone number resource

The following example specifies a phone number resource for an Amazon Connect instance.


AWSTemplateFormatVersion: 2010-09-09 Description: Specifies a phone number for Amazon Connect instance Resources: PhoneNumber: Type: 'AWS::Connect::PhoneNumber' Properties: TargetArn: arn:aws:connect:region-name:aws-account-id:instance/instance-arn Description: phone number created using cfn Type: DID CountryCode: US Tags: - Key: testkey Value: testValue