Schedule and Configure Lambda to Notify you..

Posted on April 8, 2016 by Ashwin Ram | Comments(0)

In the era of Dev-ops, continuous integration and deployment,  AWS Lambda provides you with various features, that will help you automate your needs. Lambda  is a compute service from Amazon Web Services, which performs actions on various available services of AWS, based on the program code that you upload for execution. It can be triggered by events or with a scheduled event provided by CloudWatch. In this blog, we are going to see step-by-step process of Creating Lambda Function Integrating Lambda With CloudWatch (Scheduled Event) Creating SNS Topic and Subscriptions Integrating CloudWatch With SNS for Notification Why use Lambda? Lambda will be an effective solution, when there are events that are need to be performed in a periodic manner. It will also help in infrastructure automation. Example Use Cases. Taking AMIs or Snapshots in a regular interval of time. Adding 2 servers morning at 8.00am when no of servers running is lesser than 30. etc,. Cost Comparision For a scheduled running of a program that triggers the API’s, a dedicated Linux Cron machine is commonly used. Though the program runs few times a day, the instance must be running throughout the year. Cost of a (t1.micro) EC2 machine running for a

Continue reading…

Integrating AWS Lambda with Slack

Posted on January 1, 2016 by Bhavik Joshi | Comments(5)

In this blog, we are going to integrate Lambda with slack to receive important notification in the slack channel. We will accomplish the following task. Create an Incoming Webhook in slack. Create a Lambda function which sends the notification to the slack. Make the Lambda function subscribe to the SNS Topic. Create an Alarm on the EC2 instance. Prerequisites: You must have a slack account A running EC2 instance Step by step process to integrate Lambda with Slack:   Task 1: Create an Incoming Webhook in slack. Step 1: Go to your slack application where you might be able to see below scenario Step 2: Click on your team name as below Step 3: You will find a popup Menu as shown below and click on App and Custom Integration Step 4: You will find the application site of Slack. Type “incoming” in the search box and select the Incoming Webhooks.   Step 5: Install the app in your respective Team.     Step 6: Select the channel and click on Add Incoming Webhook     Step 7: So the Incoming Webhook is being created. Step 8: All you need is a Webhook URL that you can find as below

Continue reading…

AWS Lambda – the future of event driven automation

Posted on November 5, 2015 by Srihari Patil | Comments(0)

Lambda is a compute service in Amazon Web Services, which triggers actions based on the events. Lambda is efficient and event driven which responses to events from either objects added or removed from S3, updating to DynamoDB tables, SNS, data in Kinesis Stream, Cloudwatch logs, In-App activity etc. Once our code is uploaded to Lambda, this service handles all the capacity, scaling, patching and administration of the infrastructure needed to run our code and also provides us with greater visibility of performance by publishing us with logs and metrics to Amazon CloudWatch.Lambda is cost- effective as it helps in running our code without any provisioning and managing servers with high availability.  AWS has been adding a lot of new features. AWS Lambda supports only 4 AWS regions, which include US-East (North Virginia), US-West (Oregon), EU-West (Ireland) and Asia Pacific (Tokyo). AWS provided support for writing Lambda functions in Node.js language and added Java Programming Language recently this year. New features are added in Lambda to help developers and other community people to make life much simpler and easy. Recently, AWS Lambda function has brought in new features; Functions can now be written in Python Programming Language. Lambda functions now support

Continue reading…

Deep dive into the AWS API Gateway

Posted on October 21, 2015 by Bhavik Joshi | Comments(4)

  From my previous blog, you can get a hands on with the AWS API Gateway. Now we will deep dive into it. Following points will be covered. How to pass Query String to the method? How to pass Headers to the method? How to Transform the Response of the Method? How to receive Custom Response Code (400,500,…) for the method? How partially secure your API using API Keys Prerequisites: Create a lambda function with code given here Create and Deploy the Product API with the GET Method, which integrates with the above function You can refer my previous blog to have the prerequisites.   1.How to pass Query String to the method? You have an API with you already, where you are calling an API with GET method, you get all the records in response, but what if we want a specific record in response? How can we get it? In this scenario, we can use the Query String. We will get the query string parameter from the HTTP request and then integrate the request using Mapping Templates. Step by Step process to pass the Query String Parameters to the Method   2.How to pass Headers to the method?   3.How to Transform the Response of the

Continue reading…

Integrating AWS API Gateway, Lambda and DynamoDB

Posted on August 19, 2015 by Bhavik Joshi | Comments(23)

In the current world of API, every mobile application and website have to communicate using dedicated API servers. These dedicated servers are explicitly set to handle the API calls for an application. API servers act as an intermediary between the application and the database. The bottleneck of this setup is that the API server has to be maintained to handle all the API calls. The increase in the number of API calls, increases the load of the API server which may require auto-scaling, which is cost-consuming.   The latest approach of the best architects is to utilize a new AWS service that explicitly replaces the need for a dedicated API Server. AWS API Gateway provides the ability to act as an interface between application and database which uses AWS Lambda function as the backend.     To get the essence of AWS API Gateway, we need to get hands-on with it. The next part of the blog is a detailed tutorial on how to use AWS API Gateway along with AWS Lambda & DynamoDB. People who are familiar with DynamoDB, API Gateway and Lambda can proceed with the high-level instructions. Also for people who are new to these services, there

Continue reading…