By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Create Routing Profile via AWS SDK v3 fails with "not authorized to perform: connect:* on resource: * with an explicit deny"

0

I wrote a simple program in Javascript (see below) that creates a new Routing Profile in an Amazon Connect instance. It fails with "not authorized to perform: connect:* on resource: * with an explicit deny".

I created the necessary dependencies first (a queue) and set the other parameters in the call correctly. This fails at both my workplace, where I have a full-privs admin account, and at home, in my full-privs personal account. This leads me to believe that the problem has nothing to do with permissions. I've successfully created other objects, such as Queues, Hours of Operation, etc., it's only this routing one that's failing. I've been stuck on this for three days now. If anyone has a suggestion, I would sincerely appreciate hearing it. Thank you!

Code: const { ConnectClient, CreateRoutingProfileCommand } = require("@aws-sdk/client-connect"); const connectClient = new ConnectClient({ region: "us-east-1" }); async function main() { const params = { InstanceId: "xxxxxxxx-1652-4588-8b25-xxxxxxxxxxxx", Name: "Technical", Description: "Handle stuff", DefaultOutboundQueueId: "xxxxxxxx-1851-4a26-9c0f-xxxxxxxxxxxx", MediaConcurrencies: { Channel: "TASK", Concurrency: 1, CrossChannelBehavior: { BehaviorType: "ROUTE_CURRENT_CHANNEL_ONLY" }, }, };

console.log("createRoutingProfile params", params); const cmd = new CreateRoutingProfileCommand(params); const response = await connectClient.send(cmd); return response; }

main().then((response) => { console.log("response", response); });

asked 10 months ago214 views
1 Answer
0
Accepted Answer

From the snippet provided, it appears the Syntax is not alright.

You may want to review the CreateRoutingProfileCommand Reference and have a look on MediaConcurrencies, which should be an array.

In your case this would refer to:

MediaConcurrencies: [{ 
            Channel: "TASK", 
            Concurrency: 1, 
            CrossChannelBehavior: { 
                BehaviorType: "ROUTE_CURRENT_CHANNEL_ONLY" }, 
            } ]
profile pictureAWS
answered 10 months ago
  • Thank you Eagle Eye!

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.

Guidelines for Answering Questions