-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow array notation in "Principal" section of IAM policy #4485
Comments
Hi @chiefy ,
I have raised a question to the AWS support and will update this thread with response. |
After experimenting more with the config you provided: resource "aws_elasticsearch_domain" "es" {
domain_name = "odd-catalog"
access_policies = <<CONFIG
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::REDACTED:root",
"arn:aws:iam::REDACTED:role/iam_for_lambda"
]
},
"Action": "es:*",
"Resource": "arn:aws:es:us-west-2:REDACTED:domain/odd-catalog/*"
}
]
}
CONFIG
}
it turned out the error is intermittent which makes me think that IAM roles are allowed after all (although not documented), but AWS returns this error sometimes. I managed to reproduce the erroneous state and reported the request ID back to Amazon. Also it seems we're not alone experiencing this: boto/boto3#305 @chiefy Can you try re- |
@radeksimko thanks for your help. So actually what I think is happening is that my If I do a |
@chiefy What you are describing is a known IAM issue although I'm not 100% sure that's actually causing the error here. As long as you reference the IAM role via |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
If I change it to
"AWS": "<some resource>"
it works fine.The text was updated successfully, but these errors were encountered: