Closed fracampit closed 1 year ago
Please let me if you need more details about the issue.
Hi @fracampit,
Good morning.
Thanks for reporting the issue. The error is possibly thrown during call to IAmazonLambda.GetLayerVersionAsync(). I suspect that the region determined in the environment where dotnet lambda package
is being executed is different from eu-west-2
(region for the layers arn:aws:lambda:eu-west-2:763336740511:layer:capabilities-assets:2
or arn:aws:lambda:eu-west-2:763336740511:layer:capabilities-assets:1
).
Could you please share the following:
dotnet lambda package
with the --region
parameter value eu-west-2
(e.g. dotnet lambda package --region eu-west-2 --project-location $PROJECT_LOCATION --function-layers $LAMBDA_LAYER_ARN -o publish/$CI_PIPELINE_ID.zip
and see if it works for you.Thanks, Ashish
@ashishdhingra Thanks for the suggestion, that was it.
The script was running in an environment that had the AWS_DEFAULT_REGION set to eu-west-1.
I have added a script that extracts the region from the arn:
region=$(echo "$arn" | cut -d':' -f4)
Providing the region extracted from the arn explicitly fixed the issue.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
I have the following layer versions:
When I run
dotnet lambda package --project-location $PROJECT_LOCATION --function-layers $LAMBDA_LAYER_ARN -o publish/$CI_PIPELINE_ID.zip
, where$LAMBDA_LAYER_ARN
is eitherarn:aws:lambda:eu-west-2:763336740511:layer:capabilities-assets:2
orarn:aws:lambda:eu-west-2:763336740511:layer:capabilities-assets:1
, I get the following error:Expected Behavior
Current Behavior
Reproduction Steps
n/a
Possible Solution
No response
Additional Information/Context
No response
Targeted .NET platform
.NET 6, linux-x64
CLI extension version
Amazon Lambda Tools for .NET Core applications (5.6.2)
Environment details (OS name and version, etc.)
.NET 6, linux-x64