You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2020. It is now read-only.
When running RabbitMQ in ECS, an optional configuration is to assign an IAM role.
The peer discovery plugin does not currently support this use-case. I observed this error:
2020-03-23 17:11:24.558 [debug] <0.285.0> Started rabbitmq_aws
2020-03-23 17:11:24.558 [debug] <0.285.0> Will use AWS access key of 'undefined'
2020-03-23 17:11:24.558 [debug] <0.285.0> Setting AWS region to "us-west-2"
2020-03-23 17:11:24.594 [debug] <0.285.0> Fetched EC2 instance ID from "http://169.254.169.254/latest/meta-data/instance-id": "i-xxxx"
2020-03-23 17:11:24.691 [error] <0.285.0> Error fetching autoscaling group instance list: "Forbidden"
Enriching with cloudtrail logs, I learned that the API call was happening under the context of the instance profile assigned to the underlying EC2 instance rather than the IAM role assigned to the task:
If the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable is set, then obtain access_key_id and secret_key from the task metadata endpoint, e.g.
My current workaround is to create an IAM policy that is a union of myapp-ec2-role and myapp-task-role and use this for both the EC2 instance profile as well as the task IAM role.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When running RabbitMQ in ECS, an optional configuration is to assign an IAM role.
The peer discovery plugin does not currently support this use-case. I observed this error:
Enriching with cloudtrail logs, I learned that the API call was happening under the context of the instance profile assigned to the underlying EC2 instance rather than the IAM role assigned to the task:
Version information
Suggested Implementation
If the
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
environment variable is set, then obtainaccess_key_id
andsecret_key
from the task metadata endpoint, e.g.curl -s "http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
Workaround
My current workaround is to create an IAM policy that is a union of
myapp-ec2-role
andmyapp-task-role
and use this for both the EC2 instance profile as well as the task IAM role.The text was updated successfully, but these errors were encountered: