Lambda to fetch all polls

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

pollsGetter:  handler: com.packt.serverless.kotlin.letspoll.handlers.PollsGetter  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: /polls/        method: get        cors: true        private: true        documentation:          summary: Gets all Polls          tags:            - Tag1          description: >            Gets a List of All polls          methodResponses:            - statusCode: '200'              responseModels:                "application/json": "Polls"            - statusCode: '404'              responseModels:                "application/json": "APIErrorResponseWithMessage" ...

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.