2 Answers
- Newest
- Most votes
- Most comments
0
I was able to work around this by making the Lambda function not async and run an async submethod using asyncio.get_event_loop().run_until_complete()
Still would be nice to get confirmation / documentation that async Lambdas are not compatible with websocket APIs.
answered 4 years ago
0
You might consider using boto3 Lambda.Client.invoke() and calling the WebSockets API directly with an Asynchronous Event. You marshall the data yourself into the Event object and have total control over what the other side receives. Here's a paper on using invoke() and the Asynchronous Event Design Pattern in AWS Lambdas that might help you:
answered 13 days ago
Relevant content
- Accepted Answerasked 4 years ago
- Accepted Answerasked a year ago
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Is there a better way today?