Closed omizha closed 1 month ago
Hey @omizha, as ap-east-1
is an opt-in region, it was not enabled in our account, and neither was the Chromium layer (which is hosted by the maintainer of the library).
So, we just published these layers all in the Webiny account, and these will be shipped in 5.39.7, and 5.40.0 releases. Layer ARNs are as follows:
arn:aws:lambda:ap-east-1:632417926021:layer:sharp:1
arn:aws:lambda:ap-east-1:632417926021:layer:chromium:1
Now, to inject these into your current project, the easiest way would be to create a yarn patch, add add these arns for ap-east-1
region to our package. It's easier than doing it via Pulumi.
Instructions:
yarn patch @webiny/aws-layers
layers.json
file
Once done, you will have a git patch looking like this applied to our package every time you install the deps:
diff --git a/layers.json b/layers.json
index d3d18b84c0e225c0ced70bc222d3dec43dbec012..393e9986562300fd84547123f23af75b3d8c1094 100644
--- a/layers.json
+++ b/layers.json
@@ -33,7 +33,8 @@
"us-east-1": "arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:45",
"us-east-2": "arn:aws:lambda:us-east-2:764866452798:layer:chrome-aws-lambda:45",
"us-west-1": "arn:aws:lambda:us-west-1:764866452798:layer:chrome-aws-lambda:45",
- "us-west-2": "arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:45"
+ "us-west-2": "arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:45",
+ "ap-east-1": "arn:aws:lambda:ap-east-1:632417926021:layer:chromium:1"
},
"sharp": {
"us-east-1": "arn:aws:lambda:us-east-1:632417926021:layer:sharp:11",
@@ -51,6 +52,7 @@
"eu-west-2": "arn:aws:lambda:eu-west-2:632417926021:layer:sharp:3",
"eu-west-3": "arn:aws:lambda:eu-west-3:632417926021:layer:sharp:2",
"eu-north-1": "arn:aws:lambda:eu-north-1:632417926021:layer:sharp:2",
- "sa-east-1": "arn:aws:lambda:sa-east-1:632417926021:layer:sharp:2"
+ "sa-east-1": "arn:aws:lambda:sa-east-1:632417926021:layer:sharp:2",
+ "ap-east-1": "arn:aws:lambda:ap-east-1:632417926021:layer:sharp:1"
}
}
Don't forget to add !.yarn/patches
to your .gitignore
file, and commit this yarn patch to your repo.
Version
5.39.6
Operating System
MacOS Sonoma 14.4.1
Browser
Chrome
What are the steps to reproduce this bug?
Following the instructions on the Webiny documentation here, I attempted to deploy using yarn webiny deploy in the ap-northeast-2 region.
What is the expected behavior?
The deployment should complete successfully without errors.
What do you see instead?
The deployment fails during the website project application deployment phase. The following error is encountered:
A more detailed log can be found below:
Additional information
Possible solution
I plan to upload the chrome-aws-lambda layer to Lambda directly. How can I set the
arn:aws:lambda:ap-northeast-2:764866452798:layer:chrome-aws-lambda:45
? Where in the code should I make this change? Can I edit the code to achieve this?