Question on AWSSDK.DynamoDBv2 that Document class have not been updated to support .NET 8 native AOT

0

I want to develop Lambda using .NET 8 AOT (Ahead Of Time) . This Lambda can access and manipulate AWS DynamoDB data because I have granted it the associated access permissions.

But when I use the Document class from AWSSDK.DynamoDBv2 (version 3.7.300.20) I get this warning:

Warning IL2026 Using member 'Amazon.DynamoDBv2.DocumentModel.Document.Document()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The Amazon DynamoDB high level libraries in the DocumentModel and DataModel namespace have not been updated to support Native AOT.

In fact, using the same code, I can successfully deployed a Lambda with .NET 7 AOT and didn't see any warnings about Amazon.DynamoDBv2.DocumentModel.Document.Document.

Now, what should I do to make this .NET8 AOT Lambda work like a .NET 7 AOT Lambda without changing my code?

dawn
已提問 5 個月前檢視次數 216 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南