Skip to content

EventBridge schedule for Chime SDK CreateSipMediaApplicationCall not working

0

Hello:

I configured an EventBridge schedule with an universal target of Chime SDK CreateSipMediaApplicationCall. The schedule runs as expected but always results in an error and I cannot figure out what is wrong. Here is the information that I have gathered so far:

  • CloudWatch Metrics: All the invocations result in InvocationDropped and TargetError.
  • CloudTrail Events: I see that the scheduler assumes its execution role without error but I do not see the actual API call to CreateSipMediaApplicationCall.
  • CloudWatch Logs: Nothing is logged to the SMA's log group when the scheduler runs.
  • Using the CLI I assumed the scheduler's execution role and invoked CreateSipMediaApplicationCall and it worked without issues.
  • I verified that the target parameters ("FromPhoneNumber", "SipMediaApplicationId", "ToPhoneNumber") have the same values as those in the successful CLI invocations.
  • With the "SipMediaApplicationId" I tried with just the SMA ID (which is what is required in the CLI) as well as with the SMA ARN (which does not work in the CLI) and got the same result.

Here is the scheduler's role permission policy:

{
    "Statement": [
        {
            "Action": [
                "chime:CreateSipMediaApplicationCall"
            ],
            "Effect": "Allow",
            "Resource": "SMA_ARN"
        }
    ],
    "Version": "2012-10-17"
}

and the trust policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "scheduler.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}

Here is what the target looks like:

{
  "Arn": "arn:aws:scheduler:::aws-sdk:chime:createSipMediaApplicationCall",
  "Input": "{\"FromPhoneNumber\":\"from_phone_e164\",\"SipMediaApplicationId\":\"UUID\",\"ToPhoneNumber\":\"to_phone_e164\"}",
  "RetryPolicy": {
    "MaximumEventAgeInSeconds": 86400,
    "MaximumRetryAttempts": 185
  },
  "RoleArn": "ROLE_ARN"
}

What could be going on here?

Thanks

asked 2 years ago140 views

1 Answer
1
Accepted Answer

There are a few potential issues that could be causing your EventBridge schedule for the Chime SDK CreateSipMediaApplicationCall to fail:

  1. Deprecated API: The CreateSipMediaApplicationCall API in the Amazon Chime namespace is deprecated. It's recommended to use the latest version in the Amazon Chime SDK Voice Namespace. This could be causing compatibility issues with EventBridge.

  2. Permissions: While your role has the necessary chime:CreateSipMediaApplicationCall permission, it might be missing other required permissions. For example, you might need to add permissions for EventBridge to access Chime services or for Chime to access other required resources.

  3. Input format: Ensure that the Input JSON in your target configuration is exactly as expected by the API. Any slight deviation in the parameter names or structure could cause failures.

  4. SipMediaApplicationId format: You mentioned trying both the ID and ARN. Make sure you're using the correct format as required by the API when called through EventBridge.

  5. Service principal: Your trust policy allows the scheduler.amazonaws.com service to assume the role, but you might also need to allow the chime service principal if it's required for this specific API call.

  6. Region considerations: Ensure that your EventBridge schedule and the Chime resources are in the same region, or that you've accounted for any cross-region requirements.

  7. API limitations: There might be specific limitations or requirements for using this API with EventBridge that are not documented or immediately apparent.

To troubleshoot further:

  1. Double-check all permissions, including any that might be required for EventBridge to interact with Chime services.
  2. Consider using the latest version of the API in the Amazon Chime SDK Voice Namespace if possible.
  3. Try simplifying the input parameters to the bare minimum required and gradually add complexity.
  4. Enable more detailed CloudTrail logging if possible to capture more information about the failed API calls.
  5. Contact AWS support for specific guidance on using this API with EventBridge, as there might be undocumented requirements or limitations.
    Sources
    ChimeClient (AWS SDK for Java - 2.21.28)

answered 2 years ago

EXPERT

reviewed 2 years ago

  • The problem was related to point 1 in this answer. Changing the target ARN from arn:aws:scheduler:::aws-sdk:chime:createSipMediaApplicationCall to arn:aws:scheduler:::aws-sdk:chimesdkvoice:createSipMediaApplicationCall solved it.

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.