Skip to content

Commit 6113ecd

Browse files
committed
Use Amazon ECR images for mimicing lambda with docker
1 parent 9ca34e2 commit 6113ecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/rpdk/python/codegen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Python36LanguagePlugin(LanguagePlugin):
4343
RESOURCE_ENTRY_POINT = "{}.handlers.resource"
4444
TEST_ENTRY_POINT = "{}.handlers.test_entrypoint"
4545
CODE_URI = "build/"
46+
DOCKER_TAG = 3.6
4647

4748
def __init__(self):
4849
self.env = self._setup_jinja_env(
@@ -274,7 +275,7 @@ def _docker_build(cls, external_path):
274275
LOG.debug("command is '%s'", command)
275276

276277
volumes = {str(external_path): {"bind": str(internal_path), "mode": "rw"}}
277-
image = f"lambci/lambda:build-{cls.RUNTIME}"
278+
image = f"public.ecr.aws/lambda/python:${cls.DOCKER_TAG}"
278279
LOG.warning(
279280
"Starting Docker build. This may take several minutes if the "
280281
"image '%s' needs to be pulled first.",
@@ -325,3 +326,4 @@ def _pip_build(cls, base_path):
325326
class Python37LanguagePlugin(Python36LanguagePlugin):
326327
NAME = "python37"
327328
RUNTIME = "python3.7"
329+
DOCKER_TAG = 3.7

0 commit comments

Comments
 (0)