# EnvironmentOptions

Environment variables options.

- Source: [`aws-lambda/lib/function.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/function.ts#L1827)
- Type last changed: v2.72.0 · 29 Mar 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const environmentOptions: lambda.EnvironmentOptions = {
  removeInEdge: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

environment_options = lambda.EnvironmentOptions(
    remove_in_edge=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

EnvironmentOptions environmentOptions = EnvironmentOptions.builder()
        .removeInEdge(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var environmentOptions = new EnvironmentOptions {
    RemoveInEdge = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

environmentOptions := &EnvironmentOptions{
	RemoveInEdge: jsii.Boolean(false),
}
```

## Properties

- `removeInEdge`: boolean — When used in Lambda@Edge via edgeArn() API, these environment variables will be removed.

  **Default:** false - using the function in Lambda@Edge will throw

  If not set, an error will be thrown.
