aws-ia / cloudformation-aws-marketplace-saas

AWS Marketplace Build Tools
Apache License 2.0
25 stars 20 forks source link

Add error handling or format messaging for S3 bucket naming convention #39

Open lenopip opened 2 years ago

lenopip commented 2 years ago

The "WebsiteS3BucketName" bucket name parameter doesn't inform the user of the S3 bucket naming rules nor does the template have format checking/error handling to catch an improperly named bucket. When a user submits an incorrectly formatted bucket name (e.g. sample_bucket), the deployment fails.

Recommend adding an AllowedPattern term:

e.g. QSS3BucketName": { "AllowedPattern": "^[0-9a-zA-Z]+([0-9a-zA-Z-][0-9a-zA-Z])$", "ConstraintDescription": "Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-)."