diff --git a/s3-bucket-unique-name.sh b/s3-bucket-unique-name.sh index 9e666e9..c535412 100644 --- a/s3-bucket-unique-name.sh +++ b/s3-bucket-unique-name.sh @@ -22,7 +22,8 @@ sleep 1 out2=$(echo "$out1$((1 + $RANDOM % 99))$(date)" |sha256sum) # include random number from 1-99 to try and prevent collisions -result=$(echo "$prefix-rbn-$out2" |tr ' ' '.' |cut -c 1-$pad) +# fix for https://www.cloudconformity.com/knowledge-base/aws/S3/dns-compliant-buckets-names.html +result=$(echo "$prefix-rbn-$out2" |tr ' ' '-' |cut -c 1-$pad) echo ' 1 2 3 4 5 6 6' echo '123456789012345678901234567890123456789012345678901234567890123'