-2

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?

5
  • 1
    you just need S3 read access to that location so that you can download the layer. Mar 22 at 9:33
  • 2
    A 403 error means Access Denied. It is not related to the length of the URL. Mar 24 at 8:18
  • I must be having read access to that location because my function is already using the same layer without any problem!
    – shantanuo
    Apr 17 at 3:29
  • You don't have access, Kindly check your IAM
    – deep bajaj
    Apr 18 at 6:23
  • anyone else has access? For e.g. can you download the layer?
    – shantanuo
    Apr 19 at 7:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.