aws:asset:path - Guide to using aws:asset:path in CloudFormation

aws:asset:path is a type of metadata which can be configured in CloudFromation for a Lambda function. Below are my notes on how to use it, specifically for use with AWS SAM directly with standard CloudFormation. Use aws:asset:path to specify the location of code for Lambda Function in CloudFormation for use with SAM. Using SAM with a plain CloudFormation template, not a SAM template, works just fine. In order to use AWS SAM though you must provide a Metadata section for the lambda function at the same level as Type: and Properties:....

September 22, 2022 · 2 min · chart

Optimizing for a Cloud-Native Developer Experience

Learn why and how focusing on developer experience and mirco feedback loops will speed up your development process and help you to create a better product. Cross Post from: www.drewkhoury.com Optimizing for a Cloud-Native Developer Experience - Presentation Chris and Drew share their combined knowledge around developer experience, why (micro) feedback loops matter a whole lot, and present a live demo of a Cloud Native application working locally - complete with unit tests, end-to-end tests and smoke tests....

March 25, 2022 · 3 min · chart

How to Increase Your Python Aws Cdk Lambda Development Speed by Testing Locally with AWS SAM

Cross-post from: Medium This article explains how to locally test, with AWS SAM (Serverless Application Model), a Lambda function + API Gateway created with AWS CDK (Cloud Development Kit). Python AWS CDK and SAM are a match made in heaven, or at least a match made in the cloud. This example uses the AWS CDK in Python. Using Python AWS CDK and SAM When using AWS CDK for your infrastructure as code, it can be a pain to figure out how to efficiently test your Lambda functions....

September 17, 2021 · 4 min · chart

AWS CDK: Place a Lambda function in specific subnets

I struggled for a while today to figure out how to place a lambda function inside of a given SubnetType of a VPC generated in the same CDK stack. To specify subnets for a lambda function it needs a SubnetSelection object passed in. I expected to find a method of ec2.VPC() which would give me an output with the type SubnetSelection but this doesn’t exist. After some reading of other people’s posts online I found an example which showed what I needed to do:...

January 27, 2021 · 1 min · chart

Run Postman's Newman in an AWS Lambda function: specify JSON export location

The Problem After getting my NodeJS application using Newman with the JSON reporter to work locally I started testing it in Lambda locally with SAM CLI. I encountered the following error: Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: EROFS: read-only file system, mkdir '/var/task/newman'","reason":{"errorType":"Error","errorMessage":"EROFS: read-only file system, mkdir '/var/task/newman'","code":"EROFS","errno":-30,"syscall":"mkdir","path":"/var/task/newman","help":"error creating path for file \"newman/newman-run-report-2020-07-09-15-46-40-040-0.json\" for json-reporter","stack":["Error: EROFS: read-only file system, mkdir '/var/task/newman'"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: EROFS: read-only file system, mkdir '/var/task/newman'"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process....

July 10, 2020 · 2 min · chart