Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Build and publish your AWS Lambda Layer to SAR(Serverless App Repository)

This sample walks you though building your AWS CLI lambda layer which has been published at https://github.com/aws-samples/aws-lambda-layer-awscli.

check out the repository

$ git clone https://github.com/aws-samples/aws-lambda-layer-awscli.git
$ cd aws-lambda-layer-awscli/

create your S3 staging bucket

# Let's create a staging bucket in Tokyo region
$ aws --region ap-northeast-1 s3 mb s3://pahud-tmp-ap-northeast-1

update Makefile

S3BUCKET ?= pahud-tmp-ap-northeast-1
LAMBDA_REGION ?= ap-northeast-1

build, package and deploy your lambda layer

# build the layer from scratch 
$ make layer-build 

# package and deploy the layer with `SAM` CLI 
$ make sam-layer-package sam-layer-deploy 

# [OPTIONAL] destroy the layer 
$ make sam-layer-destroy

publish your lambda layer

  1. Update your package metadata in sam-layer.yaml

  2. publish to SAR

$ make publish-new-version-to-sar

Your SAR will be published to us-east-1 and propagate to other regions.