Question

How to get security and routing profile?

I have the following cf script creating a simple AWS Connect instance.

Resources: 
  AmazonConnectInstance:
    Type: AWS::Connect::Instance
    Properties:
      Attributes:
        InboundCalls: YES
        OutboundCalls: YES
      IdentityManagementType: CONNECT_MANAGED
      InstanceAlias: 'my-demo-1234fhy49d'

Now I'd like to create an admin user in the same cf script:

...
ConnectUserAdmin:
    Type: AWS::Connect::User
    Properties:
      IdentityInfo:
        FirstName: admin
        LastName: user
      Username: adminuser
      InstanceArn: !GetAtt AmazonConnectInstance.Arn
      RoutingProfileArn: ?????
      SecurityProfileArns: [?????]
      Password: '1234567890'

However, I can't find a way to retrieve instance's security profiles or routing profiles. For example something like this !GetAtt AmazonConnectInstance.AdminProfileArn or !GetAtt AmazonConnectInstance.DefaultRoutingProfileArn would be helpful. How could I go about it (without using a custom resource)?

Important: I don't mean how to retrieve instance's security profiles or routing profiles using GET API or using cli aws connect.

 3  46  3
1 Jan 1970

Solution

 0

I believe that default profiles retain their ids during the lifetime of Amazon Connect instance.

So you only need to grab those ids once and hardcode them in your template. I assume you already hardcode the id of the instance itself, so it’s not a big difference.

Once you have access to the id within the template, you can construct the ARN manually:

arn:${Partition}:connect:${Region}:${Account}:instance/${InstanceId}/security-profile/${SecurityProfileId}

2024-07-20
gamliela