May 14, 2016

Using AWS IoT button - Simple Example

Amazon did a limited release of the programmable Dash button and unsurprisingly it got sold out within a day. It’s stated in that “We don’t know when or if this item will be back in stock.”, hence you might need to wait to get one. I take this opportunity to write a post about how I used the AWS IoT button that I received in AWS re:Invent 2015 to show case AWS IoT to the team. Read more

May 5, 2016

Automated Blue/Green deployment using Lambda and CloudFormation

Blue/Green deployment is a well-known method to deploy an application without any downtime. Performing DNS switch is one of the very common techniques to achieve this. Using DNS switch has a minor issue with DNS caching which might take some time for DNS change to be propagated. Apart from DNS switch, AWS gives us two different options to switch the stacks. One is to have single ELB and swap it across auto-scaling group and another is switching the launch configuration of the auto-scaling group. Read more

December 20, 2015

Sending response back to CFN custom resource from python Lambda function

CloudFormation uses a pre-signed S3 URL to receive the response back from the custom resources managed by it. There are few blue prints available for Node.js Lambda custom resources but nothing available for python yet. Hence I created this simple function which shall be used to send the response back to CFN custom resource by performing PUT request to the pre-signed S3 URL. import json import requests def lambda_handler(event, context): responseStatus = 'SUCCESS' responseData = {} if event['RequestType'] == 'Delete': sendResponse(event, context, responseStatus, responseData) responseData = {'Success': 'Test Passed. Read more

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

© Prakash P 2015 - 2021

Powered by Hugo & Kiss.