aws-extensions-for-dotnet-cli
aws-extensions-for-dotnet-cli copied to clipboard
Error updating Lambda function using credentials from environment variables in PowerShell
Description
I have a [default]
profile in my shared config/credentials files with an access key and secret for one account.
I attempt to deploy a Lambda function into another account using temporary credentials in my PowerShell session
$Env:AWS_ACCESS_KEY_ID="<redacted>"
$Env:AWS_SECRET_ACCESS_KEY="<redacted>"
$Env:AWS_SESSION_TOKEN="<redacted>"
dotnet lambda deploy-function
Results in an error like Error updating configuration for Lambda function: Cross-account pass role is not allowed.
I am able to proceed by temporarily renaming my [default]
profile to something else.
Environment
- Build Version: Amazon Lambda Tools for .NET Core applications (5.1.4)
- OS Info: Windows 10
- Build Environment:
- Targeted .NET Platform:
Resolution
- [ ] :wave: I can/would-like-to implement a fix for this problem myself
This is a :bug: bug-report
Similar to https://github.com/aws/aws-sdk-net/issues/1779.
This should be fixed when it is implemented in next major version of SDK.
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
No close