Ruby Posts

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

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 Creating a Serverless API Using SAM CLI and Ruby for AWS Lambda to Access Amazon RDS MySQL post.

Automating Ruby on Rails Deployments with AWS CodeDeploy

Ruby on Rails Deployments with AWS CodeDeploy

Automating deployments of your web applications brings many benefits, especially when you run them on AWS. You standardize the process, prevent human errors, and can integrate with other AWS services like EC2 Autoscaling and Elastic Load Balancing. Today I will talk about how to automate your Ruby on Rails deployments using AWS CodeDeploy. Read more at Automating Ruby on Rails Deployments with AWS CodeDeploy post.

Storing and Monitoring Rails Logs on Amazon CloudWatch

If you deploy any type of application on AWS, such as a Ruby on Rails web app; then your application will generate large amounts of logs. Hence, you will need to store and monitor these logs somewhere to understand what is going on when an unexpected event occurs. A central log server may be a choice; however, Amazon CloudWatch offers an alternative way without maintaining your log servers and with lots of capabilities.

In today’s blog post, I will describe how you can start storing your application logs on Amazon CloudWatch by using a Ruby on Rails web application as an example. The same principles here would apply to other types of application logs as well. Read more at Storing and Monitoring Rails Logs on Amazon CloudWatch post.

Signing S3 Upload Requests With Signature Version 4 in a Rails and AngularJS Application

Amazon S3 Signature v4 Process

In our Ruby on Rails web applications, we use Amazon S3 to store files. Uploading files to Amazon S3 buckets via HTTP requests, requires signing the request. Current recommended and safer signing method is Signature Version 4 and AWS regions openned after January 30, 2014, such as London and Frankfurt, only support this version.

In this blog post, I will try to exlain how to sign HTTP requests for Amazon S3 uploads in a Rails application and make requests by using AngularJS ng-file-upload module. Read more at Signing S3 Upload Requests With Signature Version 4 in a Rails and AngularJS Application post.

Online Courses

AWS CodePipeline Step by Step course logo AWS CodePipeline Step by Step course logo

AWS CodePipeline Step by Step

Learn how to create CI/CD pipelines using AWS CodePipeline, CodeCommit, CodeBuild, CodeDeploy, and CloudFormation. Automate your deployments to Amazon EC2 and S3.

Use the link below to enroll in this course with special discount.

Enroll Now on Udemy!

Alternatively, use SEP2020 coupon code during the checkout.

AWS CloudFormation Step by Step: Beginner to Intermediate course logo AWS CloudFormation Step by Step: Beginner to Intermediate course logo

AWS CloudFormation Step by Step: Beginner to Intermediate

Learn how to manage your infrastructure as code on AWS. Start creating CloudFormation stacks and writing your own templates using YAML as a beginner step by step.

This course will also be a basis for its advanced level version in the upcoming months.

Use the link below to enroll in this course with special discount.

Enroll Now on Udemy!

Alternatively, use SEP2020 coupon code during the checkout.

RSS

Subscribe to this blog's RSS feed

Categories