Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dipasqualew/c810c49ef43a6d5161c9ee4bded493a2 to your computer and use it in GitHub Desktop.
Save dipasqualew/c810c49ef43a6d5161c9ee4bded493a2 to your computer and use it in GitHub Desktop.
Resources:
E2ETestsEmailBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: E2ETestsEmailBucket
E2ETestsEmailBucketPolicy:
Type: AWS::S3::BucketPolicy
DependsOn: E2ETestsEmailBucket
Properties:
Bucket:
Ref: E2ETestsEmailBucket
PolicyDocument:
Statement:
- Principal:
Service: "ses.amazonaws.com"
Action:
- s3:PutObject
Effect: Allow
Sid: "AllowSESPuts"
Resource:
Fn::Join: ['', ['arn:aws:s3:::', Ref: E2ETestsEmailBucket, '/*'] ]
Condition:
StringEquals:
"aws:Referer": { Ref: AWS::AccountId }
E2ETestsEmailSESReceiptRule:
Type: AWS::SES::ReceiptRule
DependsOn:
- E2ETestsEmailBucket
- E2ETestsEmailBucketPolicy
Properties:
Rule:
Name: EmailE2ETestsReceiptRule
Enabled: true
Recipients:
- tests.example.com
Actions:
- S3Action:
BucketName: !Ref E2ETestsEmailBucket
ObjectKeyPrefix: emails
RuleSetName: EmailE2ETestsReceiptRuleSetName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment