Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EnvironmentVariablesService

This class is used to return environment variables that are available in the runtime of the current Lambda invocation. These variables can be a mix of runtime environment variables set by AWS and variables that can be set by the developer additionally.

see

https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime

see

https://awslabs.github.io/aws-lambda-powertools-typescript/latest/#environment-variables

Hierarchy

Index

Constructors

Properties

currentEnvironmentVariable: string = 'ENVIRONMENT'
logLevelVariable: string = 'LOG_LEVEL'
sampleRateValueVariable: string = 'POWERTOOLS_LOGGER_SAMPLE_RATE'
serviceNameVariable: string = 'POWERTOOLS_SERVICE_NAME'

Methods

  • get(name: string): string
  • getAwsRegion(): string
  • getCurrentEnvironment(): string
  • getFunctionMemory(): number
  • getFunctionName(): string
  • getFunctionVersion(): string
  • getLogLevel(): string
  • getSampleRateValue(): undefined | number
  • getServiceName(): string
  • getXrayTraceId(): string

Generated using TypeDoc