Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Created November 24, 2020 04:11
Show Gist options
  • Save thanakijwanavit/58e4e1f8a01ed3dfec27e5d3124a2eff to your computer and use it in GitHub Desktop.
Save thanakijwanavit/58e4e1f8a01ed3dfec27e5d3124a2eff to your computer and use it in GitHub Desktop.
cors configuration for sam and cloudformation
AWSTemplateFormatVersion: "2010-09-09"
Description: CORS example
Resources:
S3Bucket:
Type: "AWS::S3::Bucket"
Properties:
CorsConfiguration:
CorsRules:
-
AllowedOrigins:
- "*"
AllowedMethods:
- POST
- GET
- PUT
- DELETE
- HEAD
AllowedHeaders:
- "*"
Outputs:
BucketName:
Description: Video storage bucket
Value: !GetAtt S3Bucket.Arn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment