Lambda to delete a poll

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

pollDeletor:  handler: com.packt.serverless.kotlin.letspoll.handlers.PollDeletor  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/{pollId}/      method: DELETE      cors: true      private: true      request:        parameters:          paths:            pollId : true      reqValidatorName: requestParmaterValidator      documentation:        summary: Gets a single poll by Id        tags:        - Name        description: >          Deletes a Poll        methodResponses:        - statusCode: '200'          responseModels:            "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.