aws-extensions-for-dotnet-cli icon indicating copy to clipboard operation
aws-extensions-for-dotnet-cli copied to clipboard

Error updating Lambda function using credentials from environment variables in PowerShell

Open ashovlin opened this issue 2 years ago • 3 comments

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

ashovlin avatar Sep 27 '21 16:09 ashovlin

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.

ashishdhingra avatar Oct 01 '21 20:10 ashishdhingra

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.

github-actions[bot] avatar Oct 02 '22 00:10 github-actions[bot]

No close

ashishdhingra avatar Oct 04 '22 00:10 ashishdhingra