<commit_before>---
AWSTemplateFormatVersion: "2010-09-09"

Description:
  Creates a static website using S3 for the Wild Rydes serverless web application workshop

Parameters:
  BucketName:
    Type: String
    Description: The name for the bucket hosting your website, e.g. 'wildrydes-yourname'

  CodeBucket:
    Type: String
    Default: wildrydes-us-east-1
    Description: S3 bucket containing the code deployed by this template

  CodeKeyPrefix:
    Type: String
    Default: WebApplication/1_StaticWebHosting
    Description: Key prefix for resources referenced from the CodeBucket

Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      -
        Label:
          default: "Website Configuration"
        Parameters:
          - BucketName
      -
        Label:
          default: "Advanced Configuration"
        Parameters:
          - CodeBucket
          - CodeKeyPrefix
    ParameterLabels:
      BucketName:
        default: "Website Bucket Name"

Resources:
  WebsiteBucket:
    Properties:
      BucketName: !Ref BucketName<commit_msg>Adding regex to validate bucket name. Fixes #117<commit_after>---
AWSTemplateFormatVersion: "2010-09-09"

Description:
  Creates a static website using S3 for the Wild Rydes serverless web application workshop

Parameters:
  BucketName:
    Type: String
    Description: The name for the bucket hosting your website, e.g. 'wildrydes-yourname'
    AllowedPattern: ^[a-z0-9][a-z0-9-.]{1,61}[a-z0-9]$

  CodeBucket:
    Type: String
    Default: wildrydes-us-east-1
    Description: S3 bucket containing the code deployed by this template
    AllowedPattern: ^[a-z0-9][a-z0-9-.]{1,61}[a-z0-9]$

  CodeKeyPrefix:
    Type: String
    Default: WebApplication/1_StaticWebHosting
    Description: Key prefix for resources referenced from the CodeBucket

Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      -
        Label:
          default: "Website Configuration"
        Parameters:
          - BucketName
      -
        Label:
          default: "Advanced Configuration"
        Parameters:
          - CodeBucket
          - CodeKeyPrefix
    ParameterLabels:
      BucketName:
        default: "Website Bucket Name"

Resources:
  WebsiteBucket:
    Properties:
      BucketName: !Ref BucketName
{'fraction_non_alphanumeric': 0.07628233231039018, 'fraction_numerical': 0.01972818939061815, 'mean_word_length': 2.734860883797054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3954060', 'n_tokens_mistral': 666, 'n_tokens_neox': 636, 'n_words': 190}