CodeAmmo

EC2 Scheduled Events as a CloudWatch Metric

February 24, 2017
0 Comments

AWS will sometimes schedule an event to occur on your EC2 instances in order to perform maintenance of the host servers. The most common event will be a scheduled stop/start sequence of your instance which allows AWS to move your instance onto different hardware. When an event is scheduled for one of your instances the only notification AWS generates is an email to your AWS root account. In my experience the AWS root account is usually associated with the CEO or CIO's email address who may assume others are copied on the notification email, or may simply misunderstand or ignore the notification all together. It is almost always best to perform the scheduled event yourself, at a time that is best for you instead of letting AWS automatically reboot your servers in the middle of a busy day. However, in order to do that you need to know about it ahead of time. I've written a Lambda function to periodically scan for EC2 scheduled events and post the result as a CloudWatch metric which can then be configured to alert the appropriate personnel. 

AWS Config Compliance Notifications

February 22, 2017
0 Comments

AWS Config is becoming a very handy service for monitoring compliance rules within your AWS account. I find it especially useful in my current job for verifying all EBS volumes and RDS instances have encryption enabled to meet HIPAA compliance requirements. My one frustration with this service is the lack of user-friendly notifications when a compliance issue is discovered. You either have to check the web console regularly or have your email inbox blown up with a constant stream of AWS Config notifications. So today I took the time to create an AWS Lambda function that will process AWS Config notifications and only email you the ones that indicate a change in compliance status.

How to receive SendGrid events in AWS Lambda

December 7, 2015
0 Comments

SendGrid can be configured to send events like bounces and click tracking to a URL of your choice via their Webhooks feature. This post describes how to configure an AWS Lambda function to process these SendGrid events. By using Lambda you can easily handle the large amount of traffic SendGrid Webhooks can generate, while keeping costs and system administration work to a minimum.

Current System Stack

May 21, 2015
0 Comments

I wanted to follow up to my previous post about free cloud services with details on what I am currently using. This post details the system architecture I am currently testing. I'm also including some updated findings and recommendations.

First I want to make it clear that this system configuration is absolutely overkill for a blog that gets as much traffic as this one does. However my main purpose in setting up this blog was to give myself a platform for testing all these different services so that I can make informed decisions about which ones to use on my other projects. Since one of my other projects gets an average of half a million page views a month, my goal is to figure out how to build systems that can scale to meet that level of demand. I've tested this configuration using Loader.io (another free-tier service) to simulate 1,000 concurrent users, and it handled that load easily.

Let's start with a diagram of my current setup that I will be referencing through the rest of the post:

Install PhantomJS on Amazon Linux

May 16, 2015
0 Comments

PhantomJS isn't available from the standard Amazon Linux yum repository. Follow these steps to download a binary distribution of PhantomJS and install it on a server running Amazon Linux.