Repository: aws/aws-sdk-pandas

Issue #1357: Layer 5 does not exist, layer 4 does
Created: 2022-05-25T06:30:50Z
Describe the bug
From https://aws-data-wrangler.readthedocs.io/en/stable/layers.html I would expect the layer arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39:5 to exist. However, fetching from the command line shows that version 4 exists, but I get an AccessDeniedException for version 5.
How to Reproduce
$ aws lambda get-layer-version --layer-name arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39 --version-number 4
{
    "Content": {
        "Location": "https://awslambda-eu-cent-1-layers.s3.eu-central-1.amazonaws.com/snapshots/336392948345/AWSDataWrangler-Python39-1e485400-fef0-4ef6-b973-597a92cc55ac?versionId=9mAATJqxBbxb1v87_zVZPb9t5p8Nwikc&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJ3%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDiqyoUvEn7FVR8ZmiTNhx7RfdwhseKqNudQIkfoHfu6gIhAMQOIUnan9GdT3GncT1mLvdp7MFT3JUSr5MK1dlVmqTVKuUECIb%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAxoMNjgwNjg2NTU5NDM0IgzkQYZIt2taNaaCE1squQT4e0B56z4Yt%2BoM62Ioi9IJYDMWS8yOVqhzNQr4b%2FfDT2nJgAflWhXadiOTPNvNxzcWm1cKsdy%2FDwFUx0knzqU8FUjBWtRHQnwKH24bAcyDtcM3%2F9VBO9u2XwHQsLmcK1WYZs0eqbuO1OMUuX8r8U7o1uWi5z%2BMiU6s3V%2BRSk9wSZgY%2BrNA4aK7CQGMxGa%2BnSCKQjCyzuGQANiw3jAPBTLAtFJWzjWbD5wTG8jpKJx7b4YxFZ3rkxESdYTCGKfZMIzOMt%2Fv91I7PCaU4Ufc7hi0F4U9W4zvpR2eCHJ%2BBlsIakteu6egBSWIPnuDMXK8jPtPLpZU7%2F0JpsZqDX%2FcOewuxRQaa0ORpL9R3iAtypOeh8h56yTb7YMcpC8X4fN4yGeqgQlma9ZU4%2BHhe6nx6kaykGik290tSTd37xIjZISIvYUM6bUff%2BgORHpmCdNmzNLmp1Unt5S%2B6zYXRztKFiaVBozPwznpTdYCm%2Bd9fVlSzgrkzlpv0AG2EPZwtgwIf5QeFNEVOySWKBJE5c49VodOltWnLtt%2FTewLdmx7m9kEf8%2B0n9CRtSXoCBngut4QsTO1GYh68ek%2BG%2B0C4G3TiMScsXwibvPjvgByPjEhVcCaxzRfnBQDN1IeO3X0sDlCYdDw4V%2BsQx%2BpI2xDq7xIxKCFSoxVzk%2FKMLo0FfliqRucEZjBeub0iJGmGk2cWCM0QArgsq%2B8ceEKf%2BcIRISikP1rnnJ3G0iy9ttbOomNzg7U0SRzDaSbb3J2zTCS9LaUBjqoAbwJOmuPpxyNqnz0Sq2O7ZFj%2Bub%2FbBy8EWaOAZ82ur3nOU4TSB4XY4J6YUAsX51fPsRKdc8Ruxj7%2B4J2%2BP9fs%2FLCYfnzjvv5ru5AD042yPueT2uB4%2Bb%2FAzZoqDn6uHmRkAqXylkCGNfGM0eyFo6D6XRrXaMJTyzw21WJL5Vw3yM4MrOjj%2FH%2B4fbUTJlOUyGKPatWjlzoBFsXnabj3pWVF6pD78Et4E%2FBug%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220525T062545Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=ASIAZ47AUUDFCD4R3IV5%2F20220525%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=ee3cafb0fcc56032a454f5cfcea76bcdac4603546c7e2fddfc30ac68eb78a0b4",
        "CodeSha256": "hRLdbpuOO5KjXZehCfzX5TGwktvQycX6vpEW8FfL5Pw=",
        "CodeSize": 45533909
    },
    "LayerArn": "arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39",
    "LayerVersionArn": "arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39:4",
    "Description": "AWS Data Wrangler Lambda Layer - 2.15.1 (Python 3.9)",
    "CreatedDate": "2022-04-11T15:51:26.037+0000",
    "Version": 4,
    "CompatibleRuntimes": [
        "python3.9"
    ],
    "LicenseInfo": "Apache 2.0",
    "CompatibleArchitectures": [
        "x86_64"
    ]
}
$ aws lambda get-layer-version --layer-name arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39 --version-number 5

An error occurred (AccessDeniedException) when calling the GetLayerVersion operation: User: arn:aws:sts::407908832865:assumed-role/dhnnqualitycqjcb2-basicdev-dmannnnqbialladmin/dh is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:eu-central-1:336392948345:layer:AWSDataWrangler-Python39:5 because no resource-based policy allows the lambda:GetLayerVersion action


Expected behavior
I would expect to be able to fetch version 5.
Your project
No response
Screenshots
No response
OS
WSL2 on Windows 10
Python version
3.9
AWS DataWrangler version
2.15.1
Additional context
No response

Duplicate issue #1374: Unable to query layer in eu-west-1
Created: 2022-06-03T14:04:21Z
I'm unable to query layer version for the aws-data-wrangler layer for python3.7. I'm authenticated with an account located in eu-west-1 and can query other public layer ARNs in the region just fine.
Input:
aws lambda get-layer-version-by-arn --arn 'arn:aws:lambda:eu-west-1:336392948345:layer:AWSDataWrangler-Python37:6'
Output:
An error occurred (AccessDeniedException) when calling the GetLayerVersionByArn operation: User: <MY_USER> is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:eu-west-1:336392948345:layer:AWSDataWrangler-Python37:6 because no resource-based policy allows the lambda:GetLayerVersion action

Closing comment (2022-06-03T14:38:35Z): Duplicate of #1357