December 7, 2015

Continuous Integration - Manage shared resources across accounts automatically

I prefer creating the base AMI using packer; RDS snapshot using a Jenkins job which get triggered whenever there is a change in the database schema in the SCM. In case of installers, binaries, etc. it would be best to store them in a single S3 bucket. In all the above mentioned scenarios I prefer to share those resources to a 3rd party AWS account and remove the share when not needed. Read more

November 29, 2015

Executing Ruby code in AWS Lambda

AWS Lambda supports only Java, JavaScript & Python at the time of writing this post. I was wondering whether I can exploit the Lambda to execute chef’s knife commands on it since Lambda runs on a Linux container. Using simple python function I have identified that the code of the Lambda function gets copied to /var/task and executed from there. I decided to custom build ruby as embedded platform similar to how chef-client or chefdk are distributed. Read more

November 15, 2015

Save AWS costs by scheduled start and stop of EC2 instances

Most of the AWS resources are billed on per-hour basis which provides us an opportunity to save cost based on the usage pattern. Especially in case of Dev/Test environment, we need them only during the working days and working hours. By using AWS Lambda function (python) in combination with EC2 instance tags, scheduled start or stop can be achieved with few lines of code. Advantages of using AWS Lambda: For 128MB memory we get 3,200,000 seconds free tier usage per month in AWS Lambda which will be more than enough for this function. Read more

© Prakash P 2015 - 2023

Powered by Hugo & Kiss.