Description
I'm very excited about this functionality. It's nice to not have C# be left out in the cold. :)
I'm attempting to get an existing ASP.NET Core Web API app working under the serverless model. I am able to get the application deployed and running, but when I attempt to use DynamoDB, I'm getting a static initializer exception, which is of course uncatchable. I've pasted the exception details below. I'm running with AWSSDK.Core version 3.3.5 and AWSSDK.DynamoDBv2 version 3.3.1 (same version used in the demo) and using BasicAWSCredentials.
Is there something specific to the way that I'm using the Dynamo SDK that is causing this error?
System.TypeInitializationException: The type initializer for 'Amazon.DynamoDBv2.AmazonDynamoDBConfig' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Amazon.Util.Internal.PlatformServices.ServiceFactory' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Runtime.InteropServices.RuntimeInformation.get_OSDescription()
at Amazon.Util.Internal.InternalSDKUtils.DetermineOS()
at Amazon.Util.Internal.PlatformServices.EnvironmentInfo..ctor()
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Amazon.Util.Internal.PlatformServices.ServiceFactory..ctor()
at Amazon.Util.Internal.PlatformServices.ServiceFactory..cctor()
--- End of inner exception stack trace ---
at Amazon.Util.Internal.InternalSDKUtils.BuildUserAgentString(String serviceSdkVersion)
at Amazon.DynamoDBv2.AmazonDynamoDBConfig..cctor()