Only until I added the AWS_CONFIG_FILE line above in my script was AWS able to actually see the config file! However it can not find the credentials now, and I don't see anywhere how to set that. Set AWS_CONFIG_FILE=C:\Users\xxxx\.aws\config I just discovered this after procrastinating trying to figure out why this was happening for us. $env:USERPROFILE = "c:\users\$env:USERNAME"Įven the %homepath% variable is blank when running from a Scheduled Task. So the fix is to put something like this in your script (either BAT or PowerShell) :: in a BAT script The problem is that Windows Task Schedule sets the %USERPROFILE% to C:\Users\Default instead of the actual user the task is running under!! ? And AWS is using that to find the config and credentials files. The reason this is happening, is because aws command is not finding the the config or the credentials file! And it happens for Win2012 too.
0 Comments
Leave a Reply. |