CaseyLabs / aws-ec2-ebs-automatic-snapshot-powershell

Powershell script for Automatic EBS Snapshots and Cleanup on Amazon Web Services (AWS). Created by CaseyLabs.
http://www.caseylabs.com
GNU General Public License v2.0
25 stars 19 forks source link

AWS Credentials #1

Closed gavsto closed 9 years ago

gavsto commented 9 years ago

I'm having an issue where in certain circumstances the Powershell script (the third one) is not running - I am assuming it is it because it can't access the credentials stored in c:\Users\Administrator.aws or the username is different.

What do you think about using Set-AWSCredentials so it can all be done in one ps1, set the variables as part of the script at the top? That way the scheduled task can be done in one script.

CaseyLabs commented 9 years ago

Hi there,

Unfortunately Set-AWSCredentials is part of the AWS Powershell toolkit, which I try to avoid as this script uses the AWS CLI instead (the preference for the AWS CLI is that it's cross-platform, meaning scripts can be more easily ported across operating systems).

In this case, I think your best solution is to edit the file "2-run-backup.cmd", and change:

set USERPROFILE=C:\Users\Administrator\

to

set USERPROFILE=C:\Users\Administrator.aws\

Let me know if this works for you.

CaseyLabs commented 9 years ago

Hi there, I haven't heard anything back, so I'll close this issue.

However, I have updated the script's documentation with clearer instructions for running the script under a non-Administrator account. If you run into any other issues, please feel free to open up a new issue request!

Thanks!