Skip to content

Commit

Permalink
remove REGION from Bucket Listing
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielsoltz committed Jun 20, 2019
1 parent c8622bc commit cea45f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checks/check_extra73
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ CHECK_ALTERNATE_check703="extra73"

extra73(){
textInfo "Looking for open S3 Buckets (ACLs and Policies) in all regions... "
ALL_BUCKETS_LIST=$($AWSCLI s3api list-buckets --query 'Buckets[*].{Name:Name}' $PROFILE_OPT --region $REGION --output text)
ALL_BUCKETS_LIST=$($AWSCLI s3api list-buckets --query 'Buckets[*].{Name:Name}' $PROFILE_OPT --output text)
for bucket in $ALL_BUCKETS_LIST; do
BUCKET_LOCATION=$($AWSCLI s3api get-bucket-location --bucket $bucket $PROFILE_OPT --region $REGION --output text)
BUCKET_LOCATION=$($AWSCLI s3api get-bucket-location --bucket $bucket $PROFILE_OPT --output text)
if [[ "None" == $BUCKET_LOCATION ]]; then
BUCKET_LOCATION="us-east-1"
fi
Expand Down

0 comments on commit cea45f4

Please sign in to comment.