Comments (9)
That makes sense, sorry for breaking that use case. I have also seeing that you can get empty strings, which I fixed by using GET as default: https://github.com/LegNeato/aws-lambda-events/blob/master/aws_lambda_events/src/custom_serde.rs#L234
I really wish they had a schema. Making it optional, and the change in the Go library make sense to me.
from aws-lambda-events.
@calavera looks like we might have dropped the optional bit on translation.
from aws-lambda-events.
Looks like a regression from a90dd07#diff-e8389648fe67543e9be7cfa1a7d104432051756fd08fa4c5c32bd0c498a97583
from aws-lambda-events.
Hm, actually this looks wrong on the Go side:
https://github.com/aws/aws-lambda-go/blob/master/events/apigw.go#L9
from aws-lambda-events.
Before we had a blanket Go string
to Rust Option<String>
conversion, as Go will coerce a null string to ""
, as mentioned in the README (go's default behavior is so lame). Because this is no longer a string after #29, we don't do the blanket conversion and thus hit this bug.
While I put up a PR for this case on the go side (aws/aws-lambda-go#350, will take time) we might want to have it always be Option<Method>
on the Rust side.
Thoughts?
from aws-lambda-events.
(this isn't really handled well by the C# bindings either: https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayProxyRequest.cs, "This field is only set for REST API requests.")
from aws-lambda-events.
@jatsrt do you use the same lambda function to receive HTTP events and WS events? or only WS events? The Go library makes a distinction about the kind of APIGateway events you receive by using two different types. The code in this library is still broken either way, but it might make more sense to modify the WS event type, and not the HTTP event type.
Apparently, different language bindings implement this in different ways, so I'm not sure at all about what's the best action to take.
from aws-lambda-events.
Im my use cases they are always separate.
from aws-lambda-events.
Still not optional in the request context, so it causes an error still
from aws-lambda-events.
Related Issues (20)
- Nested events and embedded deserialisable objects HOT 5
- Add Default derive for structs that can support it HOT 2
- example-kafka-event.json is wrong HOT 6
- Security critical depends HOT 1
- Failed to build with only feature `dynamodb`
- `aws_lambda_events::s3::S3Event` missing? HOT 1
- Consider re-exporting exposed types HOT 2
- invalid type: null, expected struct ConnectQueue HOT 2
- Example of using LogEntry
- SNS: missing field `SigningCertUrl HOT 5
- Lambda Handler fails to execute when using `ApiGatewayV2CustomAuthorizerV1Request` or `ApiGatewayV2CustomAuthorizerV2Request` HOT 5
- Question: aws_lambda_events::dynamodb::Event HOT 1
- Out of sync with latest lambda_runtime HOT 3
- Missing fields in event::ses::SimpleEmailService HOT 3
- support for EventBridge payloads? HOT 2
- Potential segfault in the time crate [RUSTSEC-2020-0071] HOT 1
- Regression: S3Event not longer compiles HOT 2
- `CognitoEventUserPoolsDefineAuthChallengeRequest::user_not_found` should be optional
- Cognito passes in explicitly null booleans for DefineAuth responses HOT 1
- The crate is still vunnerable to RUSTSEC-2020-0071 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-events.