From 6d07c719dd850250fb889c492806746712866825 Mon Sep 17 00:00:00 2001 From: Sparticuz Date: Mon, 10 Oct 2022 11:13:29 -0400 Subject: [PATCH] Add instructions on how to upload the AWS Lambda layer, right from console --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8d9f30..20bf514 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,13 @@ cd chromium && \ make chromium.zip ``` -The above will create a `chromium.zip` file, which can be uploaded to your Layers console. +The above will create a `chromium.zip` file, which can be uploaded to your Layers console. You can and should upload using the `aws cli`. (Replace the variables with your own values) +```shell +bucketName="chromiumUploadBucket" && \ +versionNumber="107" && \ +aws s3 cp chromium.zip "s3://${bucketName}/chromiumLayers/chromium${versionNumber}.zip" && \ +aws lambda publish-layer-version --layer-name chromium --description "Chromium v${versionNumber}" --content "S3Bucket=${bucketName},S3Key=chromiumLayers/chromium${versionNumber.zip}" --compatible-runtimes nodejs --compatible-architectures x86_64 +``` Alternatively, you can also download the layer artifact from one of our [CI workflow runs](https://github.com/Sparticuz/chromium/actions/workflows/aws.yml?query=is%3Asuccess+branch%3Amaster), however, they expire from Github after a certain time period.