Reputation: 12749
I have an AWS credentials file working fine locally for sending SES emails in Windows 10.
c:/user/myusername/.aws/credentials
(with [default] profile info in).
The documentation + many articles I've found - says 'myusername' should be replaced with the username in use on the machine, however on the Windows Server 2012 I've tried placing the file in these locations - none work:
c:/user/Administrator/.aws/credentials
c:/user/IIS_IUSRS/.aws/credentials
c:/user/nameofsite.com/.aws/credentials (w3wp lists this as username)
I get 'Unable to find credentials' error.
Which folder do I need to put these credentials in on the server to get this working?
(I can't get appsettings.json ProfilesLocation working in this .net core MVC 2 app - something I can get to work in MVC 5 apps - so getting this working in the above way is required).
Thanks.
Upvotes: 1
Views: 940
Reputation: 604
For me, I actually store AWS credentials in the applicationhost.config file in the server. For dev machines I store them on the user store and access them as a normal config file based properties.
Upvotes: 0
Reputation: 604
According to the link https://docs.aws.amazon.com/powershell/latest/userguide/specifying-your-aws-credentials.html
Cmdlets in AWS Tools for PowerShell Core accept AWS access and secret keys or the names of credential profiles when they run, similarly to the AWS Tools for Windows PowerShell. When they run on Windows, both modules have access to the AWS SDK for .NET credential store file (stored in the per-user AppData\Local\AWSToolkit\RegisteredAccounts.json file). This file stores your keys in encrypted format, and cannot be used on a different computer. It is the first file that the AWS Tools for PowerShell searches for a credential profile, and is also the file where the AWS Tools for PowerShell stores credential profiles. For more information about the AWS SDK for .NET credential store file, see Configuring AWS Credentials. The AWS Tools for PowerShell module does not currently support writing credentials to other files or locations.
Upvotes: 1