Skip to content
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

Suggested IAM Policy for Lambda functions is too broad. #24

Open
maitreya1975 opened this issue Mar 25, 2020 · 0 comments
Open

Suggested IAM Policy for Lambda functions is too broad. #24

maitreya1975 opened this issue Mar 25, 2020 · 0 comments

Comments

@maitreya1975
Copy link

The docs suggest a policy for ElasticSearch for the Lambda function that is too broad: i.e. it allows all actions on ElasticSearch, including deleting the domain:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "es:*"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

I suggest scoping this down to just the POST action on a specific index in the domain:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "es:ESHttpPost"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:es:region:aws-account-id:domain/domain-name/test-index"
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant