I am trying to download the .zip file of the layer. I tried this command to get the location of the third party layer that I plan to use in my lambda function. But the location URL is too long and I get 403 Forbidden error.
# aws lambda get-layer-version-by-arn --arn "arn:aws:lambda:us-east-1:770693421928:layer:Klayers-p310-requests:9"
{
"Content": {
"Location": "https://prod-04-2014-layers.s3.us-east-1.amazonaws.com/snapshots/770693421928/Klayers-p310-requests-a-long-url-here",
"CodeSha256": "1vMDze/FCL0FyxN4ccNqUkK0JZM4i5wmMfZXYMY42LQ=",
"CodeSize": 888173
},
"LayerArn": "arn:aws:lambda:us-east-1:770693421928:layer:Klayers-p310-requests",
"LayerVersionArn": "arn:aws:lambda:us-east-1:770693421928:layer:Klayers-p310-requests:9",
"Description": "requests==2.31.0 | 147e396d4e434d6fb48e42bd7aa6f1453b3fd1b572be35b083ad06eb28f3e959",
"CreatedDate": "2024-03-01T02:06:11.454+0000",
"Version": 9,
"CompatibleRuntimes": [
"python3.10"
],
"LicenseInfo": "Apache 2.0",
"CompatibleArchitectures": [
"x86_64"
]
}
How to download the zip file of the layer provided by someone else?
403
error meansAccess Denied
. It is not related to the length of the URL.