AWS Lambda
AWS Lambda
Image: Dmitry Chernyshov

Introduction

The use of Lambda layers makes developers’ jobs much easier by introducing modularity across multiple Lambda functions. The creation of layers and deployment packages is very similar except on small change — the folder structure. Depending upon the runtime, this will change as listed here. Layers are added to the /opt directory and are included in the $PATH. This means that no other edits to sys.path or environment variables are required.

The Prerequisites:


Tool for parsing JSON objects from CLI

If you work with CLI tools dealing with API calls, chances are you might have been dumped with huge payload response; and want to pick selected parts of it. Enter JQ —JSON object parser CLI utility using JMESPath syntax. This is a game-changer if the API call doesn’t support native JMESPath syntax to fetch selected objects. If you use AWS CLI, I have a few examples below:

Getting started

  1. Install JQ — https://stedolan.github.io/jq/download/
  2. Start parsing JSON objects with jq!

Basics:

  • Get JSON data from curl and parse it with jq:
curl -s https://httpbin.org/get

Shreyas Gaonkar

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