aws-samples / serverless-patterns

Serverless patterns. Learn more at the website: https://serverlessland.com/patterns.
https://serverlessland.com
Other
1.48k stars 863 forks source link

Rust: upgrade all patterns to the latest version of the aws-sdk for Rust #962

Closed ymwjbxxq closed 1 year ago

ymwjbxxq commented 1 year ago

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

julianwood commented 1 year ago

Thanks for the contributing to update a whole bunch!

julianwood commented 1 year ago

Thinking of the future, is there a way with Rust to avoid having to specify a version, just select $latest or something? Will avoid manually having to update again?

ymwjbxxq commented 1 year ago

Hi Julian,

The Rust version is relatively stable and does not influence the Lambda handler.

In this case, the AWS Team made a breaking change, and it was not Rust but the AWS SDK that changed.

For the libs, for example, it is possible to do this: Instead of: lambda_http = "0.7.2" We can set: lambda_http = "0.7"

This will automatically move to the next release.

julianwood commented 1 year ago

Thanks, understood. What do you think is best to simplify future maintenance.

ymwjbxxq commented 1 year ago

In theory, once you clone it, you can use and deploy with the version of the libs you get, and it should work. I did update all only for a reason:

Like the other runtimes, someone should update the lib and the code if something changes drastically.

Imagine a node lambda. We have templates with nodejs14.x, and maybe Node14 will not be supported in the future, and someone should update all. But there is no automatic way. Even moving from node16.x to node18.x require a manual intervention because one requires the SDK v3.

Maybe create a BOT to check this stuff and possibly mark the template as outdated or send an email to the developer that published the pattern to update it kindly

julianwood commented 1 year ago

Thanks. Appreciate the info which is useful.