diff --git a/zappa/core.py b/zappa/core.py index f71134f16..ae0588129 100644 --- a/zappa/core.py +++ b/zappa/core.py @@ -972,7 +972,11 @@ def upload_to_s3(self, source_path, bucket_name, disable_progress=False): """ try: self.s3_client.head_bucket(Bucket=bucket_name) - except botocore.exceptions.ClientError: + except botocore.exceptions.ClientError as e: + # https://github.com/zappa/Zappa/issues/1315 + # 403 means bucket exists but the user does not have access + if e.response['Error']['Code'] == '403': + raise Exception(f'AWS Error: {e}. On bucket: {bucket_name}. This is likely an AWS permission issue, try adding s3:ListBucket to the deploying user or role.') # This is really stupid S3 quirk. Technically, us-east-1 one has no S3, # it's actually "US Standard", or something. # More here: https://github.com/boto/boto3/issues/125