diff --git a/lambda/dockerimagebuilder/__init__.py b/lambda/dockerimagebuilder/__init__.py index dcda9f0..8589bb5 100644 --- a/lambda/dockerimagebuilder/__init__.py +++ b/lambda/dockerimagebuilder/__init__.py @@ -70,7 +70,7 @@ def handler(event: Dict[str, Any], context) -> Dict[str, Any]: # type: ignore [ try: instances = ec2_resource.create_instances( ImageId=ami_id, - SubnetId=os.environ["LISA_SUBNET_ID"], + SubnetId=os.environ.get("LISA_SUBNET_ID", None), MinCount=1, MaxCount=1, InstanceType="m5.large",