Weird Powershell `Set-AWSCredentials` error with INI file Weird Powershell `Set-AWSCredentials` error with INI file powershell powershell

Weird Powershell `Set-AWSCredentials` error with INI file


Turns out in investigating this, we have a bug in handling the .ini format file in the latest releases (3.1.31.0 onwards) that I'm fixing now.

If you're not using one of these releases (and I don't think you are based on the message, which was fixed in those releases) then try supplying the full path to the credential file to -ProfilesLocation - it could be that the 'current path' as far as PowerShell is concerned isn't what you think it is when the cmdlet runs (I've run into this with other files I've tried to access for example from my profile).

I'll update further when I've fixed the issue.


I think if you fully qualify the path it should work....relative paths are evil.

For example use:Set-AWSCredentials -ProfilesLocation c:\Path\to\file\myAWSCredentials.ini


easily u can store the credentials by following powershell user guide

Set-AWSCredentials -AccessKey xxxxxxx44Hxxxxxxx -SecretKey WVBUyB5ylBWtpxxxxxxxxxxxxxxxxxxxxxxxxxxx -StoreAs awskeys