A developer is configuring an Amazon EventBridge Scheduler schedule to send messages to an Amazon SQS queue named OrderProcessingQueue in the same AWS account. The schedule is failing to deliver messages, and execution metrics show access denied errors.
Which two configurations are required to resolve this permissions issue? (Select TWO.)
- Configure the trust policy of the EventBridge Scheduler IAM execution role to allow the scheduler.amazonaws.com service principal to assume the role using the sts:AssumeRole action.Answer
- Attach a permissions policy to the EventBridge Scheduler IAM execution role that allows the sqs:SendMessage action on the arn:aws:sqs:us-east-1:123456789012:OrderProcessingQueue resource.Answer
- CConfigure the trust policy of the EventBridge Scheduler IAM execution role to allow the sqs.amazonaws.com service principal to assume the role using the sts:AssumeRole action.
- DAttach a permissions policy to the EventBridge Scheduler IAM execution role that allows the sts:AssumeRole action on the arn:aws:sqs:us-east-1:123456789012:OrderProcessingQueue resource.
- EConfigure the EventBridge Scheduler target payload to pass temporary credentials by setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables inside the message body.
Answer
To resolve the permissions issue, the developer must configure a trust policy on the IAM role that allows the EventBridge Scheduler service principal (scheduler.amazonaws.com) to assume the role, and attach an IAM permissions policy to that execution role that allows the sqs:SendMessage action on the specific target SQS queue resource.
For Amazon EventBridge Scheduler to deliver messages to Amazon SQS, it must assume an execution role. This requires a trust policy allowing the Scheduler service principal (scheduler.amazonaws.com) to assume the role, and a permissions policy attached to the role that grants the sqs:SendMessage permission on the target SQS queue.
Step-by-Step Solution
Key Concept
IAM execution roles require both a trust policy (allowing the service principal to assume the role) and a permissions policy (granting the role access to target resources).