The below script is used to create a database manual snapshots on all regions in an AWS account. RDS support automatic snapshots which are very useful for point in time recovery but it does not protect you from accidental deletion of RDS instances. Here are the reasons why we need manual snapshots Accidental RDS InstanceContinue reading “AWS Lambda Python Script to create Database Snapshots”
Category Archives: Python
AWS Lambda Python Script to Cleanup EBS Volumes
The below is useful lambda function to delete EBS volumes older than ‘x’ days on all regions in the aws account. Hope you enjoyed the post. Cheers Ramasankar Molleti LinkedIn
Lambda to delete indices older than ‘x’ days on Elastic Search
This is simple example of how we can delete the indices older than ‘x’ days. This example needs aws4auth, elasticsearch, curator modules installed. You can build these modules on using linux machine. I’ve used one of the ec2 instance that has amazon linux installed. # Install Dependancies yum -y install python-pip zip pip install virtualenvContinue reading “Lambda to delete indices older than ‘x’ days on Elastic Search”
AWS Lambda to connect to PostgreSQL and execute a function/query using Python
It’s been long time since i wrote a blog post. In this post i would like to show an example of lambda to connect to PostgreSQL database and execute the query. Build a PostgreSQL psycopg module in order to connect to database. I’ve built a custom compiled python library to connect to latest PostgreSQL 9.6Continue reading “AWS Lambda to connect to PostgreSQL and execute a function/query using Python”