Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
Attach Policy to AWS Elasticsearch

I have made a whitelist policy containing list of IP address from where I want to get the IP

Sample below, consider Policy ARN is arn:aws:iam::0000000:policy/Whitelister

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Resource": "*",
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": [
                        "W.X.Y.Z",
                        "A.B.C.D"
                    ]
                }
            }
        }
    ]
}

I have an AWS Elasticsearch(ES) account, which allows JSON based access policy. How can I use the above policy in AWS ES' policy to restrict access to these IPs only.

I have hard written IPs now, but that will cause redundancy and updating the IPs will be difficult.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Principal": "*",
      "Action": "*",
      "Resource": [
        "arn:aws:es:****************/domain-name/*",
        "arn:aws:es:****************/domain-name/"
      ],
      "Condition": {
        "NotIpAddress": {
          "aws:SourceIp": [
            "W.X.Y.Z",
            "A.B.C.D"
          ]
        }
      }
    }
  ]
}
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Unfortunately, you can't use your policy in IP policy for an ES domain.

Let me elaborate a bit on this, as I think there is a confusion between resource-based policies, such as IP policies for the ES domain, and identity-based policies for IAM users, roles or groups. The differences are explained in the AWS docs.

In short, you policy arn:aws:iam::0000000:policy/Whitelister is, so called, managed-policy. The managed polices can only be attached to IAM identity which can be IAM user, group or role. They can't be attached to resource-based policies.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!