delete-function command doesn't respect AWS_DEFAULT_PROFILE variable #359
Labels
bug
This issue is a bug.
module/cli-ext
p3
This is a minor priority issue
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
If you are not using a default profile set in
~/.aws/config
and rely on setting theAWS_DEFAULT_PROFILE
environment variable to select the required profile, thedotnet lambda delete-function
command will fail unless a profile is specified inline.Regression Issue
Expected Behavior
The function is deleted successfully.
Current Behavior
dotnet lambda delete-function --function-name <my_function_name>
produces output indicating an error:Reproduction Steps
.aws/credentials
.AWS_DEFAULT_PROFILE
to<my_non_default_profile>
.aws sts get-caller-identity
works, i.e., provides output likedotnet lambda deploy-function
.dotnet lambda delete-function --function-name <my_function_name>
.Possible Solution
The workaround is to specify the non-default profile inline:
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Amazon Lambda Tools for .NET Core applications (5.12.3)
Targeted .NET Platform
.NET 8
Operating System and version
Windows 11
The text was updated successfully, but these errors were encountered: