Skip to content

Commit

Permalink
Minor update to error messageing for s3 origin url function (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-jcarlson authored Aug 28, 2024
1 parent d11ff1d commit bad37e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions utils/utils_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,12 @@ def get_cloudfront_s3_origin_url(account_id, account_name, domain):
return distribution["Origins"]["Items"][0]["DomainName"]

except exceptions.ClientError as e:
print(e.response["Error"]["Code"])
logging.error(
"ERROR: Lambda execution role requires cloudfront:ListDistributions permission in %a account",
account_name,
"ERROR: error when fetching CloudFront S3 origins URLs in %a account; MSG: %s",
account_name, e.msg
)

except exceptions.ClientError as e:
print(e.response["Error"]["Code"])
logging.error("ERROR: unable to assume role in %a account %s", account_name, account_id)

return None
Expand Down

0 comments on commit bad37e0

Please sign in to comment.