If I am using AWS CLI commands ("aws"), it works to have it pick up the profile I'm using if I set the environment variable AWS_PROFILE so that I don't have to specify credentials or region for each command. This does not work for the AWS Powershell commands. I have to use -ProfileName to get those to work. Can anyone tell how to make this work so that I don't have to specify profile related stuff in each command line?
how to set AWS default profile for AWS Tools for Powershell
564 views Asked by Roman At
1
AWS Tools for PowerShell does not support
AWS_PROFILE- https://github.com/aws/aws-tools-for-powershell/issues/8You can specify the profile to use for a PowerShell session via Set-AWSCredential:
See Specifying Credentials in the AWS Tools for PowerShell user guide for more.