Skip to content
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

Lambda events and the optionality of attributes - issues to clarify #858

Closed
baldram opened this issue Apr 4, 2024 · 3 comments · Fixed by #886
Closed

Lambda events and the optionality of attributes - issues to clarify #858

baldram opened this issue Apr 4, 2024 · 3 comments · Fixed by #886

Comments

@baldram
Copy link

baldram commented Apr 4, 2024

Hi there!

Thanks for the massive amount of work put into developing this project. I've got an idea for an improvement I'd like to share.

Looking at the implementation of models for lambda events, some doubts have emerged in several places, which may require clarification and possibly correction.

Can I ask about the source on which the models for lambda events are implemented? I've scoured the entire internet, looking not only for written documentation but also Smithy, etc. At most, I found EventBridge Schemas, but not for lambda events.
I sporadically managed to find something in AWS Documentation, but only for a few events.

And where I did find a contract definition, I discovered inconsistencies in the implementation in this repository.

Let's take a closer look at the following:

I could probably send a Pull Request, but it will involve breaking changes. I'm not sure if this is something that has to wait for a Major Release. On the other hand, these seem to be important issues.

And this raises the question of how we can verify the remaining events? That's why I was asking about the specification on which these things were implemented.

@calavera
Copy link
Contributor

calavera commented Apr 4, 2024

I could probably send a Pull Request, but it will involve breaking changes. I'm not sure if this is something that has to wait for a Major Release. On the other hand, these seem to be important issues.

We make these kind of changes all the time. We're not guaranteeing backwards compatibility between minor versions at the moment. See my latest PR where I changed an optional string to an enum: https://github.com/awslabs/aws-lambda-rust-runtime/pull/856/files#diff-68127a0a666444f6d22fb233e1b76b2be5f9379e390679c4e9cdcba5d1ce0a9cR24

And this raises the question of how we can verify the remaining events? That's why I was asking about the specification on which these things were implemented.

Unfortunately, there is no easy way to verify events except by triggering them and inspecting the payloads. All these events were generated based on the Go events. Go doesn't have great string semantics, so everything that was a string in Go was translated as Option<String> in Rust.

We've improved many events with the help of contributors like yourself, so don't hesitate to send PRs that can benefit other people..

Copy link

github-actions bot commented Jun 2, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.

@baldram
Copy link
Author

baldram commented Jun 2, 2024

Thanks @calavera.
I was hoping this would be a good motivation to install the tooling, IDE, and take my first steps with Rust. But somehow, current tasks kept me busy. I'll need to report other things ;) some excuse for an MR, and finally get around to Rust.

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 a pull request may close this issue.

2 participants