I am developing an application using ASP.NET. I wonder Where is the most secured place to store Amazon AWS Id and secret key?
I thought about two possibilities: In the actual AmazonAPI.cs (class) itself as a private member. Second, as a appSettings variable in the web.config?
I must supply these credentials with the API call in order to use AWS API for .NET. I don’t use a web service to make the call. The call is made via a .cs class file that I’ve made particularly for the purpose of encapsulating Amazon API calls.
Can you please:
Provide a sample code that will demonstrate how to make it done (a good way is like the one found here) – There might be a better way if using ASP.NET 4.0, but I’m not sure. Again, I want to encrypt the following in web.config:
<appSettings>
<add key="AWSAccessKey" value="" />
<add key="AWSSecretKey" value="" />
</appSettings>
Thanks.
BTW: there is also an option to use IAM User Temporary Credentials – did you know anything about it?
Since it is very easy to encrypt/decrypt a section of the web.config, I would go for this solution: http://msdn.microsoft.com/en-us/library/dtkwfdky.aspx