UNPKG

simplify-cli

Version:
42 lines (40 loc) 1.16 kB
AWSTemplateFormatVersion: '2010-09-09' Description: API Gateway resource stack creation using Simplify CLI Parameters: Environment: Type: String Default: staging WebsiteBucketName: Type: String Resources: WebSiteS3Bucket: Type: AWS::S3::Bucket DeletionPolicy: Retain Properties: AccessControl: Private CorsConfiguration: CorsRules: - AllowedHeaders: ['*'] AllowedMethods: [GET, DELETE, POST, PUT] AllowedOrigins: ['*'] ExposedHeaders: [Date] Id: ANYCORSRuleId MaxAge: '3600' WebsiteConfiguration: IndexDocument: index.html ErrorDocument: error.html PublicAccessBlockConfiguration: BlockPublicAcls: false BlockPublicPolicy: false IgnorePublicAcls: false RestrictPublicBuckets: false BucketName: !Ref WebsiteBucketName Outputs: Region: Value: !Ref AWS::Region StackId: Value: !Ref AWS::StackId BucketDomain: Value: !GetAtt [WebSiteS3Bucket, DomainName] BucketEndpoint: Value: !Join ['', ['https://', !GetAtt [WebSiteS3Bucket, DomainName], "/index.html"]]