Skip to content

Commit 5b3f352

Browse files
committed
Take credentials from the environment
By default, we strip the values so we are overwriting but if the user specifies the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in their AWS_ENVAR_ALLOWLIST then they can read these from the environment
1 parent 04f65b2 commit 5b3f352

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const configureEnvironment = (env, allowListStr) => {
5252
}
5353
});
5454

55+
// set credentials if not set from the environment
56+
env.AWS_ACCESS_KEY_ID = env.AWS_ACCESS_KEY_ID || "test";
57+
env.AWS_SECRET_ACCESS_KEY = env.AWS_SECRET_ACCESS_KEY || "test";
58+
5559
// Explicitly set AWS_ENDPOINT_URL* to configure network access to LocalStack
5660
// This _must_ use localhost.localstack.cloud as we require valid subdomains of these paths to
5761
// resolve. Unfortunately though `curl` seems to support subdomains of localhost, the CDK does not.

0 commit comments

Comments
 (0)