--- # Deploy a S3 bucket # Author: Ronald Teijeira # Email: ronald.teijeira@techdata.com # Team: CoE TechData - Europe AWSTemplateFormatVersion: '2010-09-09' Description: Deploy a S3 bucket Parameters: BucketName: Type: String Description: The name of the S3 Bucket to create (IT MUST START WITH bcn-workshop) AllowedPattern: 'bcn-workshop[a-z0-9_-]*' Metadata: AWS::CloudFormation::Interface: ParameterLabels: BucketName: default: S3 Bucket Name Resources: S3Bucket: Type: AWS::S3::Bucket Properties: BucketName: !Sub ${BucketName}-${AWS::Region} BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 AccessControl: BucketOwnerFullControl LifecycleConfiguration: Rules: - AbortIncompleteMultipartUpload: DaysAfterInitiation: 3 NoncurrentVersionExpirationInDays: 3 Status: Enabled PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true Tags: - Key: Name Value: !Ref BucketName Key: Environment Value: workshop VersioningConfiguration: Status: Suspended Outputs: S3Bucket: Value: !Ref S3Bucket Description: S3 Bucket for object storage