We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I see Pydantic models were added for API Gateway WebSocket events here:
Model name Description APIGatewayWebSocketMessageEventModel Lambda Event Source payload for Amazon API Gateway WebSocket API message body APIGatewayWebSocketConnectEventModel Lambda Event Source payload for Amazon API Gateway WebSocket API $connect message APIGatewayWebSocketDisconnectEventModel Lambda Event Source payload for Amazon API Gateway WebSocket API $disconnect message
This is request to add the corresponding Event Source Data Classes.
It would be used like below, as an example:
import requests from aws_lambda_powertools.utilities.data_classes import ( APIGatewayWebSocketMessageEvent, event_source, ) session = requests.Session() @event_source(data_class=APIGatewayWebSocketMessageEvent) def lambda_handler(event: APIGatewayWebSocketMessageEvent, context): params = { "connection_id": event.request_context.connection_id, "data": event.json_body, } response = session.post("https://mydomain.com/myapi", data=params) if 400 <= response.status_code < 600: raise RuntimeError(response.text) return {"statusCode": 200}
I see other requests related to API Gateway WebSocket events, but they seem like different features: #1165, #5905
The text was updated successfully, but these errors were encountered:
Bem-vindo de volta @ericbn! Super nice see you here again!
Yes, it makes perfect sense to add these models to the event source as well. Do you want to submit a PR for this?
These other requests are more related to creating a Resolver for WebSocket APIs, but I'd like to explore more ideas before deciding on that.
Sorry, something went wrong.
Oi @leandrodamascena. Thanks! I can help with a PR. It's just not something I already started working at.
No rush at all! Take your time and if you need any help with this PR, please let me know.
ericbn
No branches or pull requests
Use case
I see Pydantic models were added for API Gateway WebSocket events here:
This is request to add the corresponding Event Source Data Classes.
Solution/User Experience
It would be used like below, as an example:
Alternative solutions
I see other requests related to API Gateway WebSocket events, but they seem like different features: #1165, #5905
Acknowledgment
The text was updated successfully, but these errors were encountered: