Weekly update 38
Tags: aws, serverless
Published: 2020-01-08 15:09:39

---
title: Weekly update 38
published: true
date: 2020-01-05 23:21:45 UTC
tags: aws, serverless
canonical_url: https://theburningmonk.com/2020/01/weekly-update-38/
---

Hi, welcome to the first weekly update of 2020!

First of all, I want to give a shout out to my Patreon supporters:

_Andre Silva, Boseok In, Ebru Cucen, Hrafnkell Palsson, Joe Kearney, Jon Barber, Jonathan Kosgei, Luis Gutierrez, Marko @ Serverless Life, Sal DiStefano, Shawn MacIntyre, Will Saunders, Yinan Xue_

Thank you guys so much for your continued support!

### Production-Ready Serverless workshops!

If you're looking for expert training to level-up your AWS and serverless skills? Or perhaps you're looking for a solid foundation to start from?

I might have just the workshop for you :-)

I'm taking my **Production-Ready Serverless** workshop to several cities in Europe this year, starting with Amsterdam on March 19th and 20th.

![](https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F86609087%2F6129436803%2F1%2Foriginal.20200107-174407?w=1080&auto=format%2Ccompress&q=75&sharp=10&rect=0%2C16%2C1488%2C744&s=14599b75454a1cabc96b6fd629bc60d8)

* [Amsterdam - March 19-20th](https://www.eventbrite.co.uk/e/production-ready-serverless-tickets-88658334465)
* [Helsinki - May 4-5th](https://www.eventbrite.co.uk/e/production-ready-serverless-2-days-incl-vat-tickets-88697680149)
* [Stockholm - May 14-15th](https://www.eventbrite.co.uk/e/production-ready-serverless-2-days-incl-vat-tickets-88856755949)
* [Dublin - June 16-17th](https://www.eventbrite.co.uk/e/production-ready-serverless-2-days-incl-vat-tickets-88748756921)
* [London - September 24-25th](https://www.eventbrite.co.uk/e/production-ready-serverless-2-days-incl-vat-tickets-88726678885)

The agenda for the 2-day workshop is as follows:

**Day 1**

* AWS Lambda 101
* Serverless framework 101
* Building APIs with API Gateway and Lambda
* Securing APIs with IAM authorization
* Cognito 101
* Securing APIs with Cognito User Pools
* API Gateway best practices
* Writing integration tests for Lambda
* Writing acceptance tests for Lambda
* Setting up CI/CD pipelines
* CI/CD security best practice
* Configuration management with SSM Parameter Store
* How best to secure credentials & API keys

**Day 2**

* Project organization
* Processing events in realtime Lambda
* How to choose the right application integration service (SNS vs SQS vs Kinesis vs EventBridge)
* Error handling for realtime event processing systems
* Per-function IAM roles
* Setting up log aggregation for Lambda functions
* Structured logging
* Sample debug logs in production
* Distributed tracing with X-Ray
* Capture and forward correlation IDs

### New posts

[**Year in review, 2019**](https://dev.to/theburningmonk/year-in-review-2019-2ho5). Here’s a quick look at my 2019 in terms of things I did and their reach. In short, I produced a lot of content – blog posts, talks, podcasts, webinars and open-source projects. If you’re interested, you can find all of my serverless content from 2019 in one place [**here**](https://medium.com/theburningmonk-com/all-my-serverless-content-in-2019-8e59aa8974b6).

#### **Amazon Builders’ Library in Focus**

The [Amazon Builders’ Library](https://aws.amazon.com/builders-library/?cards-body.sort-by=item.additionalFields.customSort&cards-body.sort-order=asc) was arguably the most exciting announcement at re:invent 2019. Many of you expressed an interest in my reading notes which boils down each article to the most insightful and actionable points. So I’m kicking off a new series of blog posts over on the [Lumigo](https://lumigo.io/) blog to share my notes with you all.

{% twitter 1202977067693948929 %}


The first two posts have dropped and cover the area of building resilient systems using techniques such as load shedding and best practices around handling timeouts and retries. These articles are not written with serverless in mind, but some of the advice is still applicable for serverless applications.

- [**Timeouts, retries, and backoff with jitter**](https://lumigo.io/blog/amazon-builders-library-in-focus-1-timeouts-retries-and-backoff-with-jitter/)
- [**Using load shedding to avoid overload**](https://lumigo.io/blog/amazon-builders-library-in-focus-2-using-load-shedding-to-avoid-overload/)

### Upcoming talks

I’m doing a couple of talks this month.

On Thursday, 9th Jan I’m sharing with the [AWS user group in Amsterdam](https://www.meetup.com/aws-ams/events/267133094/) the common mistakes companies make when they first transition to serverless.

I will give the same talk at [ServerlessDays Belfast](https://belfast.serverlessdays.io/) on Jan 24th, you can still get tickets to the event [**here**](https://belfast.serverlessdays.io/tickets/index.html).

And finally, I’m doing a new talk on the essential open source tools for serverless developers at the [AWS Community Day Nordics](https://awscommunitynordics.org/communityday/) in Stockholm on Jan 31st. It’s a free event, and you can register for it [**here**](https://www.eventbrite.com/e/aws-community-day-31st-of-jan-2020-stockholm-tickets-78032973725).

### AWS certified (again)

On a personal front, I passed my **AWS certification for security specialty** with a score of 901/1000 :-D My previous certifications had expired late 2019, and with [AWS IQ](https://aws.amazon.com/iq/) hopefully hitting the European shores later this year I thought it a good time to recertify.

![](https://theburningmonk.com/wp-content/uploads/2020/01/img_5e1257ce74624-300x199.png)

A few of you have asked how long I had to study and what (if any) resources did I use.

I spent 4 days in preparation, studying around 2-4 hours per day. As some of you know, I have run production workloads on AWS for 10 years so I have a lot of hands-on experience to fall back on. However, I still found A Cloud Guru’s [certification course](https://acloud.guru/learn/aws-certified-security-specialty) quite useful as both a reference handbook, directing me towards the important area to focus on. It also helped me brush up on a few services and updates which I had missed over the years, or never had to work with – e.g. CloudHSM. If you’re also taking the _security specialty_ test then make sure you know KMS like the back of your hand, it accounted for about 30% of my test questions!

The [certification page](https://aws.amazon.com/certification/certified-security-specialty/) itself has some example questions, which you can download for free. You can also pay $40 to take a mock test online. A Cloud Guru also has an exam simulator which gives you a full bank of mock test questions. They are a good approximation to the kind of questions you get in the real thing, but I found the exam questions to be slightly more ambiguous because important contexts/assumptions are often omitted. When in doubt, use the process of elimination to help you narrow down the choices.

### Complete Guide to Step Functions

I have updated my **[Step Functions course](https://theburningmonk.thinkific.com/courses/complete-guide-to-aws-step-functions?source=weeklyupdate38)** to include the latest updates from re:invent 2019:

- Express Workflows
- Dynamic parallelism with the Map state

And I’m also running a **50% off sale** until 10th January. Get the course [**here**](https://theburningmonk.thinkific.com/courses/complete-guide-to-aws-step-functions?source=weeklyupdate38).

### Open-source contributions

#### lumigo-cli

I added new commands to lumigo-cli to help you work with **EventBridge** and **CloudWatch Events** more easily. With these new commands, you can tail an EventBridge rule or bus to see what events are captured by the rule/bus in realtime. e.g.

- _lumigo-cli **tail-eventbridge-rule** –region us-east-1 –ruleName my-rule_
- _lumigo-cli **tail-eventbridge-bus** –region us-east-1 –eventBusName my-bus_

I also recorded a quick video to show these commands in action:

{% youtube 4ViJ8m7CEZU %}

If you work with EventBridge or CloudWatch Events regularly then you’re gonna want to **[check it out](https://www.npmjs.com/package/lumigo-cli)!**

On the other hand, for ANYONE who’s using AWS and find it a pain to switch between named profiles, I also updated the **whoami** and **switch-profile** commands to support assumed roles (normally configured in your _.aws/config_).

You can run _lumigo-cli_ _switch-profile_ to switch to another named profile in either the shard credential file (_.aws/credential_) or the config file (_.aws/config_). Switching to a named profile would **override**  **the _default_ profile** in the shared credential file. You can then use _lumigo-cli whoami_ to see which profile you’re currently logged in as.

![](https://theburningmonk.com/wp-content/uploads/2020/01/img_5e126167a38ae.png)

![](https://theburningmonk.com/wp-content/uploads/2020/01/img_5e12618112fdb.png)

#### dazn-lambda-powertools

Following the theme of supporting EventBridge and CloudWatch Events, the **[dazn-lambda-powertools](https://github.com/getndazn/dazn-lambda-powertools)** now allows you to auto-propagate correlation IDs through both EventBridge and CloudWatch Events!

To make it work, install _@dazn/lambda-powertools-pattern-basic_ and wrap your function handler.

![](https://theburningmonk.com/wp-content/uploads/2020/01/img_5e126bcabcf10-1024x210.png)

Amongst other things, this wrapper applies the [correlation IDs middleware](https://www.npmjs.com/package/@dazn/lambda-powertools-middleware-correlation-ids) which automatically extracts correlation IDs from the invocation event and stores them. Whenever you use the [dazn-lambda-powertools-logger](https://www.npmjs.com/package/@dazn/lambda-powertools-logger), the captured correlation IDs would be automatically added to the JSON log message. This way, you don’t need to manually extract correlation IDs from invocation events and always remember to include them in your log messages. Just use our packages and correlation IDs would flow through your functions automatically!

Equally, when you use the [EventBridge client](https://www.npmjs.com/package/@dazn/lambda-powertools-eventbridge-client) or [CloudWatch Events client](https://www.npmjs.com/package/@dazn/lambda-powertools-cloudwatchevents-client) to publish events – they are direct replacements for the corresponding AWS SDK clients – then the captured correlation IDs are automatically included in the outgoing events. The functions that process these events would then be able to extract them (via the wrapper) and automatically add them to their logs, and forward them on. So on and so forth.

Here’s a short demo of how the whole thing fits together:

{% youtube enmWTil-y7E %}

#### serverless-step-functions

A lot of recent updates to share here:

- [support the new Express Workflows](https://github.com/horike37/serverless-step-functions/issues/281) (v2.13.0)
- [one IAM role per state machine](https://github.com/horike37/serverless-step-functions/issues/249) (v2.14.0) – better security (least privilege principle) and resolves the issue of circular dependencies when creating nested workflows
- [EventBridge trigger](https://github.com/horike37/serverless-step-functions/issues/289) (v2.15.0)
- [support serverless.js](https://github.com/horike37/serverless-step-functions/issues/283) (v2.16.0)
- [support custom response headers and response template](https://github.com/horike37/serverless-step-functions/issues/295) (v2.17.0)

#### middy

Finally, a quick shout out to [Luciano](https://twitter.com/loige) for pushing middy 1.0.0 into beta! This is a long-awaited release which gives us individual packages to help keep the middy core as small as possible and helping everyone reduce their cold start time.

{% twitter 1213869275544461313 %}

Liked this article? Support me on Patreon and get direct help from me via a private Slack channel or 1-2-1 mentoring.

[![](https://theburningmonk.com/wp-content/uploads/2019/10/Screenshot-2019-10-19-at-11.44.09.png)](https://www.patreon.com/bePatron?u=905909)

 ![](https://theburningmonk.com/wp-content/uploads/2019/10/img_5dab0c477fc72.png)

Hi, my name is **Yan Cui**. I’m an **[AWS Serverless Hero](https://aws.amazon.com/developer/community/heroes/yan-cui/)** and the author of [**Production-Ready Serverless**](https://bit.ly/production-ready-serverless). I specialise in rapidly transitioning teams to serverless and building production-ready services on AWS.

Are you struggling with serverless or need guidance on best practices? Do you want someone to review your architecture and help you avoid costly mistakes down the line? Whatever the case, I’m here to help.

You can contact me via [Email](mailto:theburningmonk.com), [Twitter](https://twitter.com/theburningmonk) and [LinkedIn](https://www.linkedin.com/in/theburningmonk/).

[Hire me.](https://theburningmonk.com/hire-me)

The post [Weekly update 38](https://theburningmonk.com/2020/01/weekly-update-38/) appeared first on [theburningmonk.com](https://theburningmonk.com).

 ![](http://feeds.feedburner.com/~r/theburningmonk/~4/HAwcP10tMBM)