Lambda for responding to a poll

Following are the contents of  /resources/functions/pollResponder.yml file:

pollsResponder:  handler: com.packt.serverless.kotlin.letspoll.handlers.PollResponder  environment:    databaseUsername: ${env:LP_DATABASE_USERNAME}    databasePassword: ${env:LP_DATABASE_PASSWORD}    databaseUrl: { Fn::GetAtt: [ "letsPollDatabase", "Endpoint.Address" ] }    databasePort: ${env:LP_DATABASE_PORT}    databaseName: ${env:LP_DATABASE_NAME}  events:    - http:        path: /response/        method: POST        cors: true        private: true        reqValidatorName: requestBodyValidator        documentation:          summary: Responds to the poll          tags:            - Name          description: >            Records the response for a poll          requestBody:            description: "Request body description"          requestModels:            "application/json" ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.