diff --git a/packages/@aws-cdk/aws-s3-deployment/lambda/src/index.py b/packages/@aws-cdk/aws-s3-deployment/lambda/src/index.py index 64759acd21a46..badd1e4543aef 100644 --- a/packages/@aws-cdk/aws-s3-deployment/lambda/src/index.py +++ b/packages/@aws-cdk/aws-s3-deployment/lambda/src/index.py @@ -5,6 +5,7 @@ import json import traceback import logging +import shutil from uuid import uuid4 from botocore.vendored import requests @@ -111,6 +112,7 @@ def s3_deploy(s3_source_zip, s3_dest): # sync from "contents" to destination aws_command("s3", "sync", "--delete", contents_dir, s3_dest) + shutil.rmtree(workdir) #--------------------------------------------------------------------------------------------------- # executes an "aws" cli command