November 22, 2015

Obtain AMI Id from name to be used in CFN

In most cases we create custom AMI’s for various reasons like OS hardening, installing and configuring additional software, etc. If you use single AWS account to create the AMI’s and share it with other AWS accounts and use that as part of CloudFormation template, it is required to pass the new AMI Id every time. AWS Lambda comes handy for easy and elegant solution to get the latest AMI Id based on the AMI name and owner. 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

November 6, 2015

Best editor for AWS CloudFormation template (JSON)

AWS CloudFormation template is a way to describe the AWS resources that can be created/updated/deleted and it’s in JSON format. Like many other programming languages most of the editors/IDE don’t have proper syntax highlighting for JSON. For a long time I was using notepad++ and the built-in Javascript syntax highlighting which doesn’t provide much granular highlighting. I was looking for a much better editor and finally found Atom, the most powerful editor by GitHub. Read more

© Prakash P 2015 - 2023

Powered by Hugo & Kiss.