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.
$ git clone https://github.com/aws-samples/aws-lambda-layer-awscli.git
$ cd aws-lambda-layer-awscli/# Let's create a staging bucket in Tokyo region
$ aws --region ap-northeast-1 s3 mb s3://pahud-tmp-ap-northeast-1S3BUCKET ?= pahud-tmp-ap-northeast-1
LAMBDA_REGION ?= ap-northeast-1# 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-
Update your package metadata in sam-layer.yaml
-
publish to SAR
$ make publish-new-version-to-sarYour SAR will be published to us-east-1 and propagate to other regions.