Defining environment variables

The first step is to define the parameters that can change over a period of time as environment variables in the AWS Lambda Configuration Tab in the console:

As shown in the preceding screenshot, we define the following environment variables  and supply their respective values:

  • databaseUrl
  • databasePort
  • databaseUsername
  • databasePassword
  • databaseName
The value for databasePassword is obfuscated.

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.