CloudFormation stack scenarios to create S3 bucket due to invalid bucket name scenarios
Does anyone know how to I'm stuck on something that should probably be simple... I'm working on a project and hit a roadblock. I'm trying to deploy a CloudFormation stack that includes an S3 bucket, but I keep running into an scenario where the stack creation fails with the behavior message: `Bucket name "My-Bucket-Name" is not valid. Bucket names must be between 3 and 63 characters long and can only consist of lowercase letters, numbers, hyphens, and must start and end with a letter or number.` Here's the snippet of my CloudFormation template: ```yaml Resources: MyS3Bucket: Type: AWS::S3::Bucket Properties: BucketName: My-Bucket-Name ``` I've tried changing the bucket name to be all lowercase and removing the hyphens, but I'm still getting the same behavior. For instance, I updated my template to: ```yaml Resources: MyS3Bucket: Type: AWS::S3::Bucket Properties: BucketName: mybucketname ``` However, I still see the behavior. I also checked if the bucket name is globally unique, but that's not the question since I'm trying to create this in a separate AWS account. Iām using AWS CLI version 2.5.0 to deploy this stack. Any ideas on what could be going wrong or what I might be missing? I am also considering if there might be any inherent limitations in the CloudFormation template itself that Iām overlooking. Any help would be appreciated! I'm working on a service that needs to handle this. What's the best practice here?