I was trying to add System.Drawing library inside a lambda function using container image. Followed the AWS documentation here
Added
RUN yum install -y amazon-linux-extras
RUN amazon-linux-extras install epel -y
RUN yum install -y libgdiplus
Inside the Dockerfile.
while calling the lambda i am getting an error
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
The issue was with the version of System.Drawing.Common package I am using. I've downgraded the package from 6.0.0 to 4.7.0 and the error went away.