deployer_2.py 467 B

12345678
  1. def upload(lambda_src, target_bucket, acl, cacheControl):
  2. for folder, subs, files in os.walk(lambda_src):
  3. for filename in files:
  4. source_file_path = os.path.join(folder, filename)
  5. destination_s3_key = os.path.relpath(source_file_path, lambda_src)
  6. contentType, encoding = mimetypes.guess_type(source_file_path)
  7. upload_file(source_file_path, target_bucket,
  8. destination_s3_key, s3, acl, cacheControl, contentType)