Invalid Bucket name when creating s3 bucket with AWS SDK

It's all about name convention!

The bucket name can be between 3 and 63 characters long, and can contain only lower-case characters, numbers, periods, and dashes.


AWS provides naming standards when naming an aws bucket.

  • The bucket name can be between 3 and 63 characters long, and can contain only lower-case characters, numbers, periods, and dashes.

  • Each label in the bucket name must start with a lowercase letter or number.

  • The bucket name cannot contain underscores, end with a dash, have consecutive periods, or use dashes adjacent to periods.

  • The bucket name cannot be formatted as an IP address (198.51.100.24).

The name provided contains upper case letters, by switching to lower case letters the issue can be resolved.

https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html