You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: content/en/user-guide/integrations/aws-cdk/index.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,17 +96,24 @@ By default, stacks with validated certificates may not be deployed using the `lo
96
96
This originates from the way how CDK ensures the certificate is ready - it creates a single-file lambda function with a single dependency on `aws-sdk` which is usually preinstalled and available globally in lambda runtime.
97
97
When this lambda is executed locally from the `/tmp` folder, the package can not be discovered by Node due to the way how Node package resolution works.
98
98
99
-
### Version support
99
+
`cdklocal` works with all installed versions of the Node.js `aws-cdk` package.
100
+
However, issues exist for `aws-cdk >= 2.177.0`.
100
101
101
-
`cdklocal` supports all installed versions of the node `aws-cdk` package, however some complications are present for `aws-cdk >= 2.177.0`.
102
+
For these versions:
102
103
103
-
For these CDK versions, we remove AWS configuration environment variables like `AWS_PROFILE` from the shell environment before invoking the `cdk` command, and explicitly set `AWS_ENDPOINT_URL` and `AWS_ENDPOINT_URL_S3` to target LocalStack.
104
+
* We unset AWS-related environment variables like `AWS_PROFILE` before calling `cdk`.
105
+
* We explicitly set `AWS_ENDPOINT_URL` and `AWS_ENDPOINT_URL_S3` to point to LocalStack.
104
106
105
-
1. We do this because other environment variables may lead to a conflicting set of configuration options, where the wrong region is used to target LocalStack, or `cdklocal` tries to deploy into upstream AWS by mistake.
106
-
If individual configuration variables are needed for the deploy process (e.g. `AWS_REGION`) these configuration variables can be propagated to the `cdk` command by configuring `AWS_ENVAR_ALLOWLIST`, for example: `AWS_ENVAR_ALLOWLIST=AWS_REGION,AWS_DEFAULT_REGION AWS_DEFAULT_REGION=eu-central-1 AWS_REGION=eu-central-1 cdklocal ...`.
107
-
2. If you are manually setting `AWS_ENDPOINT_URL`, the new value will continue to be read from the environment, however `AWS_ENDPOINT_URL_S3`_must_ also be set and should include a `.s3.` component to ensure we correctly detect S3 requests.
107
+
Some environment variables may cause conflicting config, such as wrong region or accidental deploys to real AWS.
108
+
To allow specific variables (e.g., `AWS_REGION`), use `AWS_ENVAR_ALLOWLIST`:
108
109
109
-
For reference on which configuration you can use on CDK in LocalStack in this scenario please refer to the following [documentation](https://github.com/localstack/aws-cdk-local?tab=readme-ov-file#configurations).
0 commit comments