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

Hierarchy

Constructors

Properties

serviceNameVariable: string

Methods

  • It returns the value of an environment variable that has given name.

    Returns

    Parameters

    • name: string

    Returns string

  • It returns the value of the POWERTOOLS_SERVICE_NAME environment variable.

    Returns

    Returns string

  • It returns the value of the _X_AMZN_TRACE_ID environment variable.

    The AWS X-Ray Trace data available in the environment variable has this format: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=557abcec3ee5a047;Sampled=1,

    The actual Trace ID is: 1-5759e988-bd862e3fe1be46a994272793.

    Returns

    Returns undefined | string

  • It returns true if the Sampled flag is set in the _X_AMZN_TRACE_ID environment variable.

    The AWS X-Ray Trace data available in the environment variable has this format: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=557abcec3ee5a047;Sampled=1,

    Returns

    Returns boolean

  • It returns true if the string value represents a boolean true value.

    Returns

    boolean

    Parameters

    • value: string

    Returns boolean

Generated using TypeDoc