AWS .NET SDK on Linux

随声附和 提交于 2021-01-29 13:09:35

问题


I am currently moving an ASP.NET application made by a third party from Windows to Linux. I read the documentation and nothing indicates this should be a problem, but sadly

var profile = new CredentialProfile(profileName, credentials) {
    Region = RegionEndpoint.EUWest1
};

var netSDKFile = new NetSDKCredentialsFile();
netSDKFile.RegisterProfile(profile);

throws the following exception

Unhandled Exception: Amazon.Runtime.AmazonClientException: The encrypted store is not available.  This may be due to use of a non-Windows operating system or Windows Nano Server, or the current user account may not have its profile loaded.
   at Amazon.Util.Internal.SettingsManager.EnsureAvailable()
   at Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile..ctor()

Is the Amazon .NET SDK(or a part of it) not supported on Linux? If that is the case, is there a possible workaround?


回答1:


For the most part there is very little that isn't supported on Linux that is supported on Windows. Off of the top of my head I can't think of anything besides NetSDKCredentialsFile which is due to the fact it uses Win32 API to encrypt credentials.

You can use SharedCredentialsFile to register a profile in the credentials file stored under ~/.aws/credentials. This is the same credential stored supported by all of the other AWS SDK and Tools.



来源:https://stackoverflow.com/questions/57474210/aws-net-sdk-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!