16 Posts Tagged ‘aws’

(All tags.)

I converted my Lambda@Edge Function to CloudFront Functions

How to function in the clouds.

When Lambda@Edge first came out, I added it to my blog’s CloudFront distribution in order to add security headers. Then, when Lambda@Edge added Python support, I converted my function from JavaScript to Python.


CloudFront Updates Are No Longer Soul Destroying

Much less idle cloud gazing

I’ve mentioned CloudFront’s speed, or lack thereof, several times in my past posts.


Converting my CloudFront Lambda@Edge Function from JavaScript to Python

A Cloud Front

I previously blogged about how I configured my CloudFront hosted website to score A+ on securityheaders.com. I worked around CloudFront’s lack of an “add headers” feature by adding a Lambda@Edge function in JavaScript.


Scoring A+ for SSL Labs on My Cloudfront-Hosted Static Website

Another Security Castle!

I previously covered how I scored A+ for security headers on my site, which uses AWS CloudFront. I didn’t touch on scoring A+ for your TLS configuration though.


Adding EC2 Instance Recovery Alarms with CloudFormation

Automatically Push the “Recover” Button

Instance Recovery is a little-advertised, little-used feature of EC2. It doesn’t take long to set up and promises to recover your instance on the rare occasion that the underlying hardware fails. Recovery resumes the instance on new hardware, retaining its instance ID, private IP addresses, Elastic IP addresses, and all instance metadata.


A Minimum Viable CloudFormation Template

Watching the clouds form

Sometimes when testing CloudFormation features I need a minimum viable template to try that feature with.


Validating CloudFormation Templates With cfn-lint

Watching the clouds form

I’ve been working with CloudFormation in some form for about five years now. Two years ago at Time Out, I helped write an in-house tool that performed some basic template linting. One year ago at Genus AI, I started using the AWS Labs tool cfn-lint to validate my templates before deployment. It’s really neat, covers a lot more than our in-house tool did, and has saved me from a number of mistakes.


Running CloudFormation Drift Detection on All Your Stacks

Fighting drift in the cloud

CloudFormation’s stack drift detection feature is useful. It discovers ways your infrastructure that you beautifully set up with Infrastructure-as-Code has been fiddled with manually. Often this results from a “quick temporary fix” being applied manually on the web console at 2am, then forgotten about.


Updating My AWS CodeBuild Project from Ubuntu 14.04 to 18.04

Builder's Forge Hammer

I received a cheery notification email (twice) from AWS that they’re deprecating Ubuntu 14.04 on CodeBuild:


Testing Boto3 with pytest Fixtures

Testing Apparatus

This is a recipe I’ve used on a number of projects. It combines pytest fixtures with Botocore’s Stubber for an easy testing experience of code using Boto3. (Botocore is the library behind Boto3.)