-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathresources.yml
48 lines (48 loc) · 1.37 KB
/
resources.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
Resources:
FirehoseToS3Role:
Type: AWS::IAM::Role
Properties:
RoleName: FirehoseToS3Role
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service:
- firehose.amazonaws.com
Action:
- sts:AssumeRole
Policies:
- PolicyName: FirehoseToS3Policy
PolicyDocument:
Statement:
- Effect: Allow
Action:
- s3:AbortMultipartUpload
- s3:GetBucketLocation
- s3:GetObject
- s3:ListBucket
- s3:ListBucketMultipartUploads
- s3:PutObject
Resource: '*'
ServerlessKinesisFirehoseBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketName: ${env:STAGE}-serverless-kinesis-firehose-bucket
ServerlessKinesisFirehose:
Type: AWS::KinesisFirehose::DeliveryStream
Properties:
DeliveryStreamName: ${env:STAGE}-serverless-kinesis-firehose
S3DestinationConfiguration:
BucketARN:
Fn::Join:
- ''
- - 'arn:aws:s3:::'
- Ref: ServerlessKinesisFirehoseBucket
BufferingHints:
IntervalInSeconds: "60"
SizeInMBs: "1"
CompressionFormat: "UNCOMPRESSED"
Prefix: "raw/"
RoleARN: { Fn::GetAtt: [ FirehoseToS3Role, Arn ] }