Skip to content

remove S3 SDK deps #1237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2022
Merged

remove S3 SDK deps #1237

merged 2 commits into from
Aug 2, 2022

Conversation

jcstorms1
Copy link
Contributor

Issue #, if available:
#1226
Description of changes:

  • Updates S3Event.cs to handle all properties correctly
  • Removes SDK.S3 dependency

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashishdhingra ashishdhingra added the pr/needs-review This PR needs a review from a Member. label Jul 8, 2022
@@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to take a direct dependency on Newtonsoft.Json because a lot of users prefer System.Text.Json because it gives a greater cold start benefit. You can avoid referencing Newtonsoft by using DataAnnotation attributes instead of Newtonsoft's JsonProperty attribute.

Here is an example for customizing the names without directly referencing Newtonsoft and supporting System.Text.Json. https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.LexV2Events/LexV2Message.cs#L45

To avoid complications with System.Text.Json you can drop netstandard2.0 from the Amazon.Lambda.S3.csproj file and have it only target netcoreapp3.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Thanks for the feedback!

@jcstorms1 jcstorms1 requested a review from normj July 14, 2022 15:20
@ashovlin ashovlin requested a review from ganeshnj July 14, 2022 17:26
@jcstorms1
Copy link
Contributor Author

Friendly bump @normj or @ashovlin if you don't mind taking a look at the changes 🙇
cc @ashishdhingra

Copy link
Member

@normj normj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pulled down the branch locally and confirm the existing S3 serialization test work. This will be a major version bump but user's migrating should have to do very little to switch. Most likely change a using statement.

@normj normj changed the base branch from master to dev August 2, 2022 16:33
@normj normj merged commit 6976d22 into aws:dev Aug 2, 2022
@normj normj removed the pr/needs-review This PR needs a review from a Member. label Aug 2, 2022
@normj
Copy link
Member

normj commented Aug 2, 2022

The PR has been released in version 3.0.0 of the Amazon.Lambda.S3 package. Thank you for your work on this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants