A good first step is to check [Nimble](https://nimble.directory) to see if anyone has made libraries to simplify this. There appear to be several for AWS and OpenAPI.
- AWS Lambda function and Swagger/OpenAPI documentation bajith
- AWS Lambda function and Swagger/OpenAPI documentation 3-2-1
- AWS Lambda function and Swagger/OpenAPI documentation bajith