Skip to content

Instantly share code, notes, and snippets.

@cgswong
Created March 8, 2017 16:12
Show Gist options
  • Save cgswong/ec6739824a5f3034441c3e99fdcc86b8 to your computer and use it in GitHub Desktop.
Save cgswong/ec6739824a5f3034441c3e99fdcc86b8 to your computer and use it in GitHub Desktop.
AWS ES IAM policy allows both IP access (Kibana proxy) and resource (EC2) access
{
"Version": "2012-10-17",
"Statement": [
{
"Resource": "arn:aws:es:us-east-1:<account_id>:domain/<es_domain>/<es_index|*>",
"Principal": {
"AWS": "arn:aws:iam::<account_id>:role/<iam_role>"
},
"Action": ["es:*"],
"Effect": "Allow",
"Sid": "IAMRoleResourceFullAccess"
},
{
"Sid": "KibanaProxyIPReadAccess",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "es:ESHttpGet",
"Condition": {
"IpAddress": {
"aws:SourceIp": [
"AAA.BBB.CCC.DDD"
]
}
},
"Resource":
"arn:aws:es:us-east-1:<account_id>:domain/<es_domain>/<es_index|*>"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment