Open lexedwards opened 8 months ago
Original PR called out a documentation inconsistency regarding these fields. https://github.com/aws/aws-lambda-go/pull/247/files
I wonder if something changed recently!
I haven't been using this particular event with Go, so I can't really comment on how recent the change has been, however, after some experimenting, I've seen it reliably work with some alterations to the type declared:
L83's Version
type as json.Number
- Though, I'm 99% sure float64
would work here as well looking at the error.
L108's Version
type as string
I don't personally reference this value in any of my code, the change was purely to get unmarshalling to not panic, so I'm not sure if there's going to be any breaking changes for users to utilise the value.
I don't personally reference this value in any of my code, the change was purely to get unmarshalling to not panic,
If you haven't already, you can unblock yourself by copying the structs into your project, and deleting the fields in your copy.
I'm still following up with the service team to try and figure out what happened here.
The service team identified errors in the sample event documentation which I believe lead to the type mismatches in the original PR that introduced this struct. Documentation should be fixed by now, and guidance from the service team confirmed that correct typing would be:
.version -> string
.detail.version -> numeric
.detail.type.version -> string
Is your feature request related to a problem? Please describe.
Triggering a lambda with EventBridge CodePipeline events, i.e.:
The Lambda in question has this structure:
Upon execution, it almost immediately fails and outputs one of two errors (so far):
Describe the solution you'd like
I'm fairly certain I'm using the correct event type here, but I could be wrong. However, I'd like a solution to the lambda not failing immediately and the type being correct for what EventBridge is passing into the lambda.