Ruby on Rails Posts

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.

Continue reading the Serving Dynamic Websites with Amazon CloudFront blog post.

Configuring Rails Logging for Docker on Amazon ECS & Fargate

When you dockerize a Ruby on Rails application on AWS, it is essential to configure logging correctly to monitor application health. There are some tweaks to achieve this and I will briefly describe the process in this blog post.

Firstly, let’s make a brief introduction to Docker along with its deployment options on AWS.

Continue reading the Configuring Rails Logging for Docker on Amazon ECS & Fargate blog 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.

Continue reading the Automating Ruby on Rails Deployments with AWS CodeDeploy blog 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.

Continue reading the Storing and Monitoring Rails Logs on Amazon CloudWatch blog 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. The current recommended, and safe signing method is Signature Version 4, and AWS regions opened after January 30, 2014, such as London and Frankfurt, only support this version.

In this blog post, I will try to explain how to sign HTTP requests for Amazon S3 uploads in a Rails application and make requests by using AngularJS ng-file-upload module.

Continue reading the Signing S3 Upload Requests With Signature Version 4 in a Rails and AngularJS Application blog post.