Originally published at https://lukemiller.dev/blog/aws-codepipeline-variables-a-helpful-little-guide/

Ah, AWS, the never ending supply of Lego pieces to build to your heart’s content. Today we’ll talk about a small feature within CodePipeline that I was pleased to find to make my pipelines more dynamic: Action Variables.

TL;DR CodePipeline provides us with action-based variables, for a select number of actions, that allow us to make our pipelines more dynamic. docs

What Are CodePipeline Variables?

I’m assuming you understand that CodePipeline is a series of Stages that are composed of Actions, so we will jump ahead to what Action Variables are.

A select number of CodePipeline Actions are able to…

Originally published at https://lukemiller.dev/blog/missing-authentication-token-cloudfront-apig-troubleshooting-252d8a33c412/

Adding an API Gateway deployment to AWS CloudFront should be a very simple activity in your day, and yet, here you are! You hit the Missing Authentication Token error and are possibly about to lose your mind. Let me help.

AWS CloudFront

This one has foiled many developers, so you’re in good company. If you’re sure you set everything up correctly and still get the dreaded Missing Authentication Token response, then take just one look at the popular AWS Forum discussion on this and you’ll see how often this is an issue for people. …

If you’re using a Node.js environment for your Lambda and Try/Catch blocks to encapsulate your code then CloudWatch won’t be able to gather errors for monitoring metrics since the Catch block allows you to gracefully handle errors. This means no helpful alarms to inform you of Lambda invocations that errored.

But, I’m going to show you a work around.

Let’s take a look at some examples of Lambdas to illustrate the problem.

Lambda Without Try/Catch Block

exports.handler = async (event, context) => {
const result = nonExistentFunction();

if(result != null){…

As we all quarantine ourselves during this COVID-19 pandemic, I figured it would be a good time to discuss how to provide “social distancing” for an RDS and Lambdas. To protect your RDS from others we’ll place it in a VPC along with a Lambda that accesses it.

Who this is for: someone who has never set up a custom VPC.

Overview of what we’re going to do:

1- Create a new VPC and three subnets

2- Configure the subnet route tables

3- Create an RDS instance

4- Configure two Security Groups

5- Create a Lambda that connects to your…

AWS SAM templates simplify the writing of infrastructure as code when deploying Cloudformation resources. Of the five serverless resources that SAM boasts, AWS::Serverless:LayerVersion gives you the capability to create a Lambda LayerVersion. Layers allow you to encapsulate libraries and runtime code, and import them into Lambdas without impeding on the file size limitations of your Lambda code. If you have common code shared across several Lambdas, Layers can save you from repetitive code.

If you’re writing a SAM application and need to add a Layer for your different Lambdas to access, it’s quite easy to create and then !Ref …

The Problem:

CloudFormation does not redeploy your API Gateway stage(s), even after it updates those resources.


My team and I have a SAM template with Lambda resources. We don’t explicitly create an AWS::Serverless::Api resource since they are implicitly created for us when Api events are used in the AWS::Serverless::Function resources. We went through months of deployments that contained updates to our functions but kept their names static. Introduced versioning to the names of our Lambdas also introduced an issue. We assumed the API Gateway resources that trigger those functions would be redeployed by CloudFormation when we changed our Lambdas’…

Originally published at https://lukemiller.dev/blog/aws-cloudformation-capabilities-parameter-ab73a373278/

If you’re anything like me, you’ve probably found yourself wondering what the capabilities parameter does that is requested during a deployment of a CloudFormation (CF) template?

We’ve all hit that InsufficientCapabilitiesException: Requires capabilities : [CAPABILITY_IAM] error before, and if you’re on the CLI it tells you exactly how to overcome the error. With the solution provided for you, it’s easy to give the CLI what it wants and move right along with the rest of your work without digging into what that CAPABILITY_IAM is even doing. So, here’s an explanation.


When you update or create…


AWS CodeStar is a useful service for those wanting to quickly get a project started with a CI/CD workflow using AWS services. In my opinion, the less experienced AWS developer should only use it for personal learning, not for production code. The service abstracts away too many important AWS concepts that will ultimately hinder the new AWS developer who wants to become proficient in the AWS-way of doing things. …

After I hit my two-year mark of learning web development, I felt compelled to encourage other learners going through the same process. I came across posts similar to this during my early days and found them to be much needed sources of encouragement. One part of the learning process that I felt none of them hit sufficiently was the mental approach that’s needed to succeed. That’s what I want to share with you.

When I decided last year to switch to tech after six years as a middle school teacher I was stoked, yet stuck. It was a perfect time…

Luke Miller

Working towards master-status for all things front-end web development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store