Skip to content

ChadDevOps/aws-elasticsearch-lambda-delete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Summary

This AWS lambda function will delete old indicies from the AWS Elastic Search Service.

Req:

Python 3.6.

  • Run ./install.sh (or skip install and use function_clean.zip in the steps below)
  • Create a python 3.6 function in lambda.
  • Upload function.zip to your lambda python function.
  • Edit the lambda_function.py values as needed.

Permissions:

Add the following permissions to your function

    {
      "Effect": "Allow",
      "Action": [
        "es:ESHttpPost",
        "es:ESHttpGet",
        "es:ESHttpPut",
        "es:ESHttpDelete"
      ],
      "Resource": "arn:aws:es:us-west-1:123456789012:domain/my-domain/*"
    }

Basic Settings

Index Deletion 128 MB 10 seconds

Trigger

Index Deletion CloudWatch Events Schedule expression rate(1 day)

Refs:

About

AWS Lambda script to delete old indexes if ES server is low on space.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published