forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransform_serverless_template.yaml
92 lines (91 loc) · 2.39 KB
/
transform_serverless_template.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
myFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: 's3://testBucket/mySourceCode.zip'
AutoPublishAlias: live
DeploymentPreference:
Type: Linear10PercentEvery10Minutes
Events:
ThumbnailApi:
Type: Api
Properties:
Path: /thumbnail
Method: GET
S3Trigger:
Type: S3
Properties:
Bucket: !Ref myBucket
Events: s3:ObjectCreated:*
MySnsTrigger:
Type: SNS
Properties:
Topic: arn:aws:sns:us-east-1:123456789012:my_topic
MyKinesisTrigger:
Type: Kinesis
Properties:
Stream: arn:aws:kinesis:us-east-1:123456789012:stream/my-stream
StartingPosition: TRIM_HORIZON
MyDynamoDbTrigger:
Type: DynamoDB
Properties:
Stream: arn:aws:dynamodb:us-east-1:123456789012:table/TestTable/stream/2016-08-11T21:21:33.291
StartingPosition: TRIM_HORIZON
MyTimer:
Type: Schedule
Properties:
Input: rate(5 minutes)
OnTerminate:
Type: CloudWatchEvent
Properties:
Pattern:
detail:
state:
- terminated
ExampleLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: "Example"
CompatibleRuntimes:
- python3.6
AppName:
Type: AWS::Serverless::Application
Properties:
Parameters:
Debug: 'True'
MemorySizeMB: '128'
TimeoutSec: '300'
myBucket:
Type: AWS::S3::Bucket
Properties: {}
myFunctionRole:
Type: AWS::DynamoDB::Table
Properties:
KeySchema:
-
AttributeName: String
KeyType: String
ProvisionedThroughput:
WriteCapacityUnits: 5
ReadCapacityUnits: 10
myIamPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: "CFNUsers"
PolicyDocument:
Version: "2012-10-17"
Statement:
-
Effect: "Allow"
Action:
- "cloudformation:Describe*"
- "cloudformation:List*"
- "cloudformation:Get*"
Resource: "*"
Roles:
- !Ref ServerlessRestApi