From 5e48214df3ea394c0e9121db2d4101e7d92d0fdb Mon Sep 17 00:00:00 2001 From: Setu Shah Date: Wed, 29 Dec 2021 20:53:34 -0800 Subject: [PATCH] fix: Set region explicitly --- packages/@aws-cdk/aws-lambda-python/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-python/README.md b/packages/@aws-cdk/aws-lambda-python/README.md index d9bc533b14488..2a8de2d34c4de 100644 --- a/packages/@aws-cdk/aws-lambda-python/README.md +++ b/packages/@aws-cdk/aws-lambda-python/README.md @@ -158,9 +158,10 @@ const image = DockerImage.fromBuild(entry); const domain = 'my-domain'; const domainOwner = '111122223333'; const repoName = 'my_repo'; +const region = 'us-east-1'; const codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim(); -const indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${this.stack.env?.region}.amazonaws.com/pypi/${repoName}/simple/`; +const indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`; new lambda.PythonFunction(this, 'function', { entry,