Serverless Posts

Provisioning Custom CloudFormation Resources Using AWS Lambda

  • by Emre Yilmaz
  • Dec 15, 2017
  • AWS, Serverless, DevOps

AWS CloudFormation is the foundation of operational excellency on AWS. We code our infrastructure in JSON of YAML templates and test it as much as we need before deploying on production. It is simply infrastructure as code concept.

However, some new resources may not be supported by AWS at the same time they are launched. As of today, an example to these is Elastic GPU resource. The solution is to define a custom CloudFormation resource and attach this resource to a Lambda function which launches these resources. The Lambda function should also be in the same template and I will describe the process in this blog post. ... read more

Controlling API Usage with API Keys and Usage Plans on AWS API Gateway

  • by Emre Yilmaz
  • Nov 28, 2017
  • AWS, Serverless
Contolling API Usage with API Keys and Usage Plans on AWS API Gateway

AWS API Gateway provides us to develop our own RESTful APIs and trigger AWS Lambda functions upon HTTP requests. I often use this architecture in my serverless applications and developed many APIs for my clients. With the help of API Keys and Usage Plans, we can define maximum request quotas and manage request rates while sharing our API with others.

Although API keys can never be considered as a full security measure as we often store these keys in client applications calling the API, usage plans can provide us to limit the API access and be sure that usage does not exceed tresholds we define. ... read more

Running AWS Lambda Functions in a VPC and Accessing RDS

  • by Emre Yilmaz
  • Oct 23, 2017
  • AWS, Serverless
Running AWS Lambda in VPC and Accessing RDS

AWS Lambda allows us running code without maintaining servers and paying only for the resources allocated during the code run. In most cases, we do not need to run our Lambda function in a VPC and it is recommended not to run in a VPC in these situations as a best practice. Some of examples to these are sending emails using Amazon SES or accessing a DynamoDB table.

However, to access an RDS database in your Lambda function you have to run your function in the same VPC or in a VPC that has a peering connection to the VPC of your RDS instance. In this blog post I would like to discuss about running AWS Lambda functions in a VPC and accessing a RDS MySQL database. ... read more