DevOps Posts - Page 5

Serverless APIs With Ruby, AWS Lambda & AWS SAM CLI: Accessing Amazon RDS

Using Ruby for AWS Lambda and Creating a Serverless API to Access Amazon RDS MySQL

Having a Ruby on Rails background, I got excited to try Ruby to code my AWS Lambda functions when its support for AWS Lambda was announced at Re:Invent 2018. Finally, to try Ruby on AWS Lambda, I developed a simple API using AWS Serverless Application Model (SAM) to access an Amazon RDS MySQL database. I wanted to compare it with my experiences of doing this with Python and Node.js.

Although it may seem simple, installing mysql2 gem as a dependency proved itself to be challenging than others, because it has native extensions and depends on the environment you use bundler. As always, Docker simplifies our job by providing a similar environment that our AWS Lambda function runs inside.

In this post, I will make an introduction to AWS SAM CLI and using Ruby for AWS Lambda functions. Let’s begin! Read more at Serverless APIs With Ruby, AWS Lambda & AWS SAM CLI: Accessing Amazon RDS post.

AWS::NoValue on CloudFormation: Conditional Property Configuration

Defining Resource Properties Conditionally Using AWS::NoValue on CloudFormation

AWS CloudFormation provides a handful of pseudo parameters which you can use along with your template conditions and parameters to increase the reusability of your templates. One of them is the AWS::NoValue parameter which acts as the null value in programming languages.

In this post, I will talk about some examples of its use cases.

Read more at AWS::NoValue on CloudFormation: Conditional Property Configuration post.

My AWS CloudFormation Step by Step: Beginner to Intermediate Course is Live on Udemy!

AWS CloudFormation Step by Step: Beginner to Intermediate

I am happy to announce that my first online course, AWS CloudFormation Step by Step: Beginner to Intermediate, is now live on Udemy.

In this post, I want to introduce you with this new course. I will talk about the topics, what you will learn by taking it as well as the structure of the course. In addition, I will also share a free coupon that will be valid for a limited time with the followers of this blog. Read more at My AWS CloudFormation Step by Step: Beginner to Intermediate Course is Live on Udemy! post.

The Order of Resource Creations on AWS CloudFormation

AWS CloudFormation resource creations order

In an AWS CloudFormation template, you define independent resources or resources that are implicitly dependent; in other words, referencing other resources. For instance, you can define an Amazon EC2 instance and a security group. Then, you might choose to attach the security group to the EC2 instance or not. In these two cases, AWS CloudFormation organizes the order of the resource creations differently.

In addition, you might have another resource, such as an Amazon SNS topic in the same template, which you might want to provision after your EC2 instance is created. Maybe you have an explicit dependency between them.

In this blog post, I will talk about how AWS CloudFormation handles the order of creation for independent or implicitly dependent resources. I will also explain how to add your custom dependencies in a template. Read more at The Order of Resource Creations on AWS CloudFormation post.

Serving Dynamic Websites with Amazon CloudFront

CloudFront Dynamic Web Distribution Sample Architecture

The most popular usage of Amazon CloudFront is to distribute static content such as images, videos or other objects existing in an Amazon S3 bucket. However, you can also use Amazon CloudFront to distribute your dynamic content such as a Ruby on Rails or PHP web application and benefit from the advantages of utilizing the globally distributed network infrastructure of AWS. In this blog post, I will talk about the advantages and the necessary configuration options for creating an Amazon CloudFront distribution for a dynamic web application. Read more at Serving Dynamic Websites with Amazon CloudFront post.