Skip to content

How to associate a phone number with a flow

0

I have two resources in my CloudFormation template: flow and a phone number.

 ...

Flow:
    Type: AWS::Connect::ContactFlow
    Properties:
    ...
PhoneNumber:
    Type: AWS::Connect::PhoneNumber
    Properties:
      CountryCode: GB
      Type: DID
      TargetArn: !Ref AmzConnectInstance
      ...

How could I associate the phone number and the flow inside the template?

Important: I am not asking how to associate from the dashboard or using aws command line or via API or via SDK, etc. Only using the CloudFormation.

1 Answer
0

This can be achieved by using the CustomResource class to invoke a Lambda function. Use the Lambda function to make an API call using the AssociatePhoneNumberContactFlow API to associate a phone number with a flow.

Reference links for additional info: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CustomResource.html https://docs.aws.amazon.com/connect/latest/APIReference/API_AssociatePhoneNumberContactFlow.html

AWS
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.