Hello, Welcome to Microsoft Q&A,
There isn't enough information to go on to tell what is going on exactly. You mentioned that it worked in the Unity Editor. I assume that there may be some steps missed out to cause code stripping when using AWS SDK with IL2CPP build. I am not familiar with AWS SDK. I recommend you check AWS SDK developer Guide documents for information on using IL2CPP to build the Unity project with AWS SDK.
A managed stack trace could help you understand the cause of this exception. To find the player log file, please navigate to Device Portal->System->File explorer->LocalAppData->[ProjectName]->TempState->UnityPlayer.log.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.