@mapbox/cloudfriend 6.0.0-SNAPSHOT-1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nyc_output/{cfc820e0-b613-4675-b027-ca1a7c3c3d64.json → ef96ce8d-21af-4efa-8fde-041438a648a6.json} +1 -1
- package/.nyc_output/{520655c5-a674-40fe-935c-4cace7e4719f.json → efe82251-5e4c-42c5-9ae2-a01d0358ec20.json} +1 -1
- package/.nyc_output/processinfo/ef96ce8d-21af-4efa-8fde-041438a648a6.json +1 -0
- package/.nyc_output/processinfo/efe82251-5e4c-42c5-9ae2-a01d0358ec20.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/changelog.md +5 -0
- package/lib/shortcuts/api.md +598 -1019
- package/package.json +3 -3
- package/.nyc_output/processinfo/520655c5-a674-40fe-935c-4cace7e4719f.json +0 -1
- package/.nyc_output/processinfo/cfc820e0-b613-4675-b027-ca1a7c3c3d64.json +0 -1
package/lib/shortcuts/api.md
CHANGED
|
@@ -1,226 +1,500 @@
|
|
|
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
|
-
|
|
1
|
+
## Classes
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt><a href="#CrossAccountRole">CrossAccountRole</a></dt>
|
|
5
|
+
<dd><p>Create an IAM role that will be assumed from another AWS Account.</p>
|
|
6
|
+
</dd>
|
|
7
|
+
<dt><a href="#EventLambda">EventLambda</a></dt>
|
|
8
|
+
<dd><p>A Lambda function that runs in reaction to a CloudWatch Event. Includes
|
|
9
|
+
a LogGroup, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
|
|
10
|
+
a Lambda permission.</p>
|
|
11
|
+
</dd>
|
|
12
|
+
<dt><a href="#GlueDatabase">GlueDatabase</a></dt>
|
|
13
|
+
<dd><p>Create a Glue Database.</p>
|
|
14
|
+
</dd>
|
|
15
|
+
<dt><a href="#GlueJsonTable">GlueJsonTable</a></dt>
|
|
16
|
+
<dd><p>Create a Glue Table backed by line-delimited JSON files on S3.</p>
|
|
17
|
+
</dd>
|
|
18
|
+
<dt><a href="#GlueOrcTable">GlueOrcTable</a></dt>
|
|
19
|
+
<dd><p>Create a Glue Table backed by ORC files on S3.</p>
|
|
20
|
+
</dd>
|
|
21
|
+
<dt><a href="#GlueParquetTable">GlueParquetTable</a></dt>
|
|
22
|
+
<dd><p>Create a Glue table backed by Parquet files on S3.</p>
|
|
23
|
+
</dd>
|
|
24
|
+
<dt><a href="#GluePrestoView">GluePrestoView</a></dt>
|
|
25
|
+
<dd><p>Create a Glue Presto View.</p>
|
|
26
|
+
</dd>
|
|
27
|
+
<dt><a href="#GlueSparkView">GlueSparkView</a></dt>
|
|
28
|
+
<dd><p>Create a Glue Presto View.</p>
|
|
29
|
+
</dd>
|
|
30
|
+
<dt><a href="#GlueTable">GlueTable</a></dt>
|
|
31
|
+
<dd><p>Create a Glue Table.</p>
|
|
32
|
+
<p>Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:</p>
|
|
33
|
+
<ul>
|
|
34
|
+
<li><a href="#gluejsontable">GlueJsonTable</a></li>
|
|
35
|
+
<li><a href="#glueorctable">GlueOrcTable</a></li>
|
|
36
|
+
</ul>
|
|
37
|
+
</dd>
|
|
38
|
+
<dt><a href="#KinesisFirehoseBase">KinesisFirehoseBase</a></dt>
|
|
39
|
+
<dd><p>Base class for creating a Kinesis Firehouse that can receive records
|
|
40
|
+
by direct put or by consuming a Kinesis Stream.
|
|
41
|
+
Each implementing subclass enables writing to a specific destination.
|
|
42
|
+
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
|
|
43
|
+
a policy allowing records to be delivered to the delivery stream.</p>
|
|
44
|
+
</dd>
|
|
45
|
+
<dt><a href="#Lambda">Lambda</a></dt>
|
|
46
|
+
<dd><p>Baseline CloudFormation resources involved in a Lambda Function. Creates a
|
|
47
|
+
Log Group, a Role, an Alarm on function errors, and the Lambda Function itself.</p>
|
|
48
|
+
</dd>
|
|
49
|
+
<dt><a href="#LogSubscriptionLambda">LogSubscriptionLambda</a></dt>
|
|
50
|
+
<dd><p>A Lambda function that runs in response to a log subscription filter.
|
|
51
|
+
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
|
|
52
|
+
and a Lambda permission.</p>
|
|
53
|
+
</dd>
|
|
54
|
+
<dt><a href="#QueueLambda">QueueLambda</a></dt>
|
|
55
|
+
<dd><p>A Lambda function that runs in response to messages in an SQS queue.
|
|
56
|
+
Includes a Log Group, a Role, an Alarm on function errors, and an event source
|
|
57
|
+
mapping.</p>
|
|
58
|
+
</dd>
|
|
59
|
+
<dt><a href="#Queue">Queue</a></dt>
|
|
60
|
+
<dd><p>Creates an SQS queue with an attached dead-letter queue.</p>
|
|
61
|
+
<p>Standard (non-FIFO) queues can receive messages through an SNS topic. The
|
|
62
|
+
shortcut either creates a new SNS topic that can be used for sending messages
|
|
63
|
+
into the queue, or subscribes the queue to an existing SNS topic provided
|
|
64
|
+
with the <code>ExistingTopicArn</code> option. For FIFO queues, no SNS topic is created
|
|
65
|
+
and <code>ExistingTopicArn</code> is ignored.</p>
|
|
66
|
+
</dd>
|
|
67
|
+
<dt><a href="#Role">Role</a></dt>
|
|
68
|
+
<dd><p>Create an IAM role.</p>
|
|
69
|
+
</dd>
|
|
70
|
+
<dt><a href="#S3KinesisFirehose">S3KinesisFirehose</a></dt>
|
|
71
|
+
<dd><p>Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
|
|
72
|
+
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
|
|
73
|
+
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
|
|
74
|
+
Also creates a CloudWatch alarm on the <code>DeliveryToS3.DataFreshness</code> metric -- the age
|
|
75
|
+
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
|
|
76
|
+
By default, if that metric exceeds double the <code>BufferingIntervalInSeconds</code>, the
|
|
77
|
+
alarm is triggered.</p>
|
|
78
|
+
</dd>
|
|
79
|
+
<dt><a href="#ScheduledLambda">ScheduledLambda</a></dt>
|
|
80
|
+
<dd><p>A Lambda function that runs on in response to a CloudWatch Event. Includes
|
|
81
|
+
a Log Group, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
|
|
82
|
+
a Lambda permission.</p>
|
|
83
|
+
</dd>
|
|
84
|
+
<dt><a href="#ServiceRole">ServiceRole</a></dt>
|
|
85
|
+
<dd><p>Create an IAM role that will be assumed by an AWS service, e.g. Lambda or ECS.</p>
|
|
86
|
+
</dd>
|
|
87
|
+
<dt><a href="#StreamLambda">StreamLambda</a></dt>
|
|
88
|
+
<dd><p>A Lambda function that runs in response to events in a DynamoDB or Kinesis
|
|
89
|
+
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
|
|
90
|
+
source mapping.</p>
|
|
91
|
+
</dd>
|
|
92
|
+
</dl>
|
|
63
93
|
|
|
64
|
-
|
|
94
|
+
<a name="CrossAccountRole"></a>
|
|
65
95
|
|
|
66
|
-
|
|
67
|
-
|
|
96
|
+
## CrossAccountRole
|
|
97
|
+
Create an IAM role that will be assumed from another AWS Account.
|
|
98
|
+
|
|
99
|
+
**Kind**: global class
|
|
100
|
+
<a name="new_CrossAccountRole_new"></a>
|
|
101
|
+
|
|
102
|
+
### new CrossAccountRole(options)
|
|
68
103
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* `options.Code` **[Object][59]** See [AWS documentation][61].
|
|
77
|
-
* `options.DeadLetterConfig` **[Object][59]** See [AWS documentation][62]. (optional, default `undefined`)
|
|
78
|
-
* `options.Description` **[String][60]** See [AWS documentation][63]. (optional, default `'${logical name} in the ${stack name} stack'`)
|
|
79
|
-
* `options.Environment` **[Object][59]** See [AWS documentation][64]. (optional, default `undefined`)
|
|
80
|
-
* `options.FunctionName` **[String][60]** See [AWS documentation][65]. (optional, default `'${stack name}-${logical name}'`)
|
|
81
|
-
* `options.Handler` **[String][60]** See [AWS documentation][66]. (optional, default `'index.handler'`)
|
|
82
|
-
* `options.KmsKeyArn` **[String][60]** See [AWS documentation][67]. (optional, default `undefined`)
|
|
83
|
-
* `options.Layers` **[Array][68]<[String][60]>** See [AWS documentation][69]. (optional, default `undefined`)
|
|
84
|
-
* `options.MemorySize` **[Number][70]** See [AWS documentation][71]. (optional, default `128`)
|
|
85
|
-
* `options.ReservedConcurrentExecutions` **[Number][70]** See [AWS documentation][72]. (optional, default `undefined`)
|
|
86
|
-
* `options.Runtime` **[String][60]** See [AWS documentation][73]. (optional, default `'nodejs16.x'`)
|
|
87
|
-
* `options.Tags` **[Array][68]<[Object][59]>** See [AWS documentation][74]. (optional, default `undefined`)
|
|
88
|
-
* `options.Timeout` **[Number][70]** See [AWS documentation][75]. (optional, default `300`)
|
|
89
|
-
* `options.TracingConfig` **[Object][59]** See [AWS documentation][76]. (optional, default `undefined`)
|
|
90
|
-
* `options.VpcConfig` **[Object][59]** See [AWS documentation][77]. (optional, default `undefined`)
|
|
91
|
-
* `options.Condition` **[String][60]** If there is a `Condition` defined in the template
|
|
92
|
-
that should control whether to create this Lambda function, specify
|
|
93
|
-
the name of the condition here. See [AWS documentation][78]. (optional, default `undefined`)
|
|
94
|
-
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
|
|
95
|
-
to this Lambda function. See [AWS documentation][79]. (optional, default `undefined`)
|
|
96
|
-
* `options.Statement` **[Array][68]<[Object][59]>** Policy statements that will be added to a generated IAM role defining the permissions your Lambda function needs to run. *Do not use this option when specifying your own role via RoleArn.* (optional, default `[]`)
|
|
97
|
-
* `options.RoleArn` **[String][60]** If specified, the Lambda function will use this role instead of creating a new role. *If this option is specified, do not use the Statement option; add the permissions you need to your Role directly.* (optional, default `undefined`)
|
|
98
|
-
* `options.AlarmName` **[String][60]** See [AWS documentation][80]. (optional, default `'${stack name}-${logical name}-Errors-${region}'`)
|
|
99
|
-
* `options.AlarmDescription` **[String][60]** See [AWS documentation][81]. (optional, default `'Error alarm for ${stack name}-${logical name} lambda function in ${stack name} stack'`)
|
|
100
|
-
* `options.AlarmActions` **[Array][68]<[String][60]>** See [AWS documentation][82]. (optional, default `[]`)
|
|
101
|
-
* `options.Period` **[Number][70]** See [AWS documentation][83]. (optional, default `60`)
|
|
102
|
-
* `options.EvaluationPeriods` **[Number][70]** See [AWS documentation][84]. (optional, default `1`)
|
|
103
|
-
* `options.Statistic` **[String][60]** See [AWS documentation][85]. (optional, default `'Sum'`)
|
|
104
|
-
* `options.DatapointsToAlarm` **[Number][70]** See [AWS documentation][86]. (optional, default `1`)
|
|
105
|
-
* `options.Threshold` **[Number][70]** See [AWS documentation][87]. (optional, default `0`)
|
|
106
|
-
* `options.ComparisonOperator` **[String][60]** See [AWS documentation][88]. (optional, default `'GreaterThanThreshold'`)
|
|
107
|
-
* `options.TreatMissingData` **[String][60]** See [AWS documentation][89]. (optional, default `'notBreaching'`)
|
|
108
|
-
* `options.EvaluateLowSampleCountPercentile` **[String][60]** See [AWS documentation][90]. (optional, default `undefined`)
|
|
109
|
-
* `options.ExtendedStatistic` **[String][60]** See [AWS documentation][91]] (optional, default `undefined`)
|
|
110
|
-
* `options.OKActions` **[Array][68]<[String][60]>** See [AWS documentation][92]. (optional, default `undefined`)
|
|
111
|
-
|
|
112
|
-
### Examples
|
|
113
|
-
|
|
114
|
-
```javascript
|
|
104
|
+
| Param | Type | Description |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| options | <code>Object</code> | Extends the options for [`Role`](#role). You do not need to provide an `AssumeRolePrincipals` attribute, but do need to include the following additional attributes: |
|
|
107
|
+
| options.Accounts | <code>Array.<(String\|Object)></code> | An array of accounts that can assume this IAM Role. These could be account IDs (`123456789012`), account ARNs (`arn:aws:iam::123456789012:root`), or CloudFormation intrinsic function objects (`cf.sub('arn:aws:iam::${AccountIdParameter}:root')`). |
|
|
108
|
+
|
|
109
|
+
**Example**
|
|
110
|
+
```js
|
|
115
111
|
const cf = require('@mapbox/cloudfriend');
|
|
116
112
|
|
|
117
113
|
const myTemplate = { ... };
|
|
118
114
|
|
|
119
|
-
const
|
|
115
|
+
const role = new cf.shortcuts.CrossAccountRole({
|
|
116
|
+
LogicalName: 'MyRole',
|
|
117
|
+
Accounts: ['123456789012'],
|
|
118
|
+
Statement: [
|
|
119
|
+
{
|
|
120
|
+
Effect: 'Allow',
|
|
121
|
+
Action: 's3:GetObject',
|
|
122
|
+
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
module.exports = cf.merge(myTemplate, role);
|
|
128
|
+
```
|
|
129
|
+
<a name="EventLambda"></a>
|
|
130
|
+
|
|
131
|
+
## EventLambda
|
|
132
|
+
A Lambda function that runs in reaction to a CloudWatch Event. Includes
|
|
133
|
+
a LogGroup, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
|
|
134
|
+
a Lambda permission.
|
|
135
|
+
|
|
136
|
+
**Kind**: global class
|
|
137
|
+
<a name="new_EventLambda_new"></a>
|
|
138
|
+
|
|
139
|
+
### new EventLambda(options)
|
|
140
|
+
|
|
141
|
+
| Param | Type | Default | Description |
|
|
142
|
+
| --- | --- | --- | --- |
|
|
143
|
+
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
|
|
144
|
+
| options.EventPattern | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern). |
|
|
145
|
+
| [options.State] | <code>String</code> | <code>'ENABLED'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state). |
|
|
146
|
+
|
|
147
|
+
**Example**
|
|
148
|
+
```js
|
|
149
|
+
const cf = require('@mapbox/cloudfriend');
|
|
150
|
+
|
|
151
|
+
const myTemplate = { ... };
|
|
152
|
+
|
|
153
|
+
const lambda = new cf.shortcuts.EventLambda({
|
|
120
154
|
LogicalName: 'MyLambda',
|
|
121
155
|
Code: {
|
|
122
156
|
S3Bucket: 'my-code-bucket',
|
|
123
157
|
S3Key: 'path/to/code.zip'
|
|
158
|
+
},
|
|
159
|
+
EventPattern: {
|
|
160
|
+
'detail-type': ['AWS Console Sign In via CloudTrail'],
|
|
161
|
+
detail: {
|
|
162
|
+
eventSource: ['signin.amazonaws.com'],
|
|
163
|
+
eventName: ['ConsoleLogin']
|
|
164
|
+
}
|
|
124
165
|
}
|
|
125
166
|
});
|
|
126
167
|
|
|
127
168
|
module.exports = cf.merge(myTemplate, lambda);
|
|
128
169
|
```
|
|
170
|
+
<a name="GlueDatabase"></a>
|
|
129
171
|
|
|
130
|
-
##
|
|
172
|
+
## GlueDatabase
|
|
173
|
+
Create a Glue Database.
|
|
131
174
|
|
|
132
|
-
**
|
|
175
|
+
**Kind**: global class
|
|
176
|
+
<a name="new_GlueDatabase_new"></a>
|
|
177
|
+
|
|
178
|
+
### new GlueDatabase(options)
|
|
179
|
+
|
|
180
|
+
| Param | Type | Default | Description |
|
|
181
|
+
| --- | --- | --- | --- |
|
|
182
|
+
| options | <code>Object</code> | | Options. |
|
|
183
|
+
| options.LogicalName | <code>String</code> | | The logical name of the Glue Database within the CloudFormation template. |
|
|
184
|
+
| options.Name | <code>String</code> | | The name of the database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-name). |
|
|
185
|
+
| [options.CatalogId] | <code>String</code> | <code>AccountId</code> | The AWS account ID for the account in which to create the database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-database.html#cfn-glue-database-catalogid). |
|
|
186
|
+
| [options.Description] | <code>String</code> | <code>'Created by the ${AWS::StackName} CloudFormation stack'</code> | The description of the database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description). |
|
|
187
|
+
| [options.LocationUri] | <code>String</code> | | The location of the database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-locationuri). |
|
|
188
|
+
| [options.Parameters] | <code>String</code> | | Parameters of the database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-parameters). |
|
|
189
|
+
| [options.Condition] | <code>String</code> | | If there is a `Condition` defined in the template that should control whether to create this database, specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html). |
|
|
190
|
+
| [options.DependsOn] | <code>String</code> | | Specify a stack resource dependency to this database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html). |
|
|
191
|
+
|
|
192
|
+
**Example**
|
|
193
|
+
```js
|
|
194
|
+
const cf = require('@mapbox/cloudfriend');
|
|
133
195
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
196
|
+
const myTemplate = { ... };
|
|
197
|
+
|
|
198
|
+
const db = new cf.shortcuts.GlueDatabase({
|
|
199
|
+
LogicalName: 'MyDatabase',
|
|
200
|
+
Name: 'my_database'
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
module.exports = cf.merge(myTemplate, db);
|
|
204
|
+
```
|
|
205
|
+
<a name="GlueJsonTable"></a>
|
|
206
|
+
|
|
207
|
+
## GlueJsonTable
|
|
208
|
+
Create a Glue Table backed by line-delimited JSON files on S3.
|
|
209
|
+
|
|
210
|
+
**Kind**: global class
|
|
211
|
+
<a name="new_GlueJsonTable_new"></a>
|
|
212
|
+
|
|
213
|
+
### new GlueJsonTable(options)
|
|
214
|
+
|
|
215
|
+
| Param | Type | Default | Description |
|
|
216
|
+
| --- | --- | --- | --- |
|
|
217
|
+
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
|
|
218
|
+
| options.Location | <code>String</code> | | The physical location of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location). |
|
|
219
|
+
| [options.TableType] | <code>String</code> | <code>'EXTERNAL_TABLE'</code> | Hard-wired by this shortcut. |
|
|
220
|
+
| [options.InputFormat] | <code>String</code> | <code>'org.apache.hadoop.mapred.TextInputFormat'</code> | Hard-wired by this shortcut. |
|
|
221
|
+
| [options.OutputFormat] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'</code> | Hard-wired by this shortcut. |
|
|
222
|
+
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
|
|
223
|
+
| [options.SerdeInfo.SerializationLibrary] | <code>Object</code> | <code>'org.openx.data.jsonserde.JsonSerDe'</code> | Hard-wired by this shortcut. |
|
|
224
|
+
|
|
225
|
+
<a name="GlueOrcTable"></a>
|
|
226
|
+
|
|
227
|
+
## GlueOrcTable
|
|
228
|
+
Create a Glue Table backed by ORC files on S3.
|
|
229
|
+
|
|
230
|
+
**Kind**: global class
|
|
231
|
+
<a name="new_GlueOrcTable_new"></a>
|
|
232
|
+
|
|
233
|
+
### new GlueOrcTable(options)
|
|
234
|
+
|
|
235
|
+
| Param | Type | Default | Description |
|
|
236
|
+
| --- | --- | --- | --- |
|
|
237
|
+
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
|
|
238
|
+
| options.Location | <code>String</code> | | The physical location of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location). |
|
|
239
|
+
| [options.TableType] | <code>String</code> | <code>'EXTERNAL_TABLE'</code> | Hard-wired by this shortcut. |
|
|
240
|
+
| [options.InputFormat] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'</code> | Hard-wired by this shortcut. |
|
|
241
|
+
| [options.OutputFormat] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'</code> | Hard-wired by this shortcut. |
|
|
242
|
+
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
|
|
243
|
+
| [options.SerdeInfo.SerializationLibrary] | <code>Object</code> | <code>'org.apache.hadoop.hive.ql.io.orc.OrcSerde'</code> | Hard-wired by this shortcut. |
|
|
244
|
+
|
|
245
|
+
<a name="GlueParquetTable"></a>
|
|
246
|
+
|
|
247
|
+
## GlueParquetTable
|
|
248
|
+
Create a Glue table backed by Parquet files on S3.
|
|
249
|
+
|
|
250
|
+
**Kind**: global class
|
|
251
|
+
<a name="new_GlueParquetTable_new"></a>
|
|
252
|
+
|
|
253
|
+
### new GlueParquetTable(options)
|
|
254
|
+
|
|
255
|
+
| Param | Type | Default | Description |
|
|
256
|
+
| --- | --- | --- | --- |
|
|
257
|
+
| options | <code>Object</code> | | Accepts the same options as cloudfriend's [`GlueTable`](https://github.com/mapbox/cloudfriend/blob/master/lib/shortcuts/glue-table.js), though the following additional attributes are either required or hard-wired: |
|
|
258
|
+
| options.Location | <code>String</code> | | The physical location of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location). |
|
|
259
|
+
| [options.TableType] | <code>String</code> | <code>'EXTERNAL_TABLE'</code> | Hard-wired by this shortcut. |
|
|
260
|
+
| [options.InputFormat] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'</code> | - Hard-wired by this shortcut. |
|
|
261
|
+
| [options.OutputFormat] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'</code> | - Hard-wired by this shortcut. |
|
|
262
|
+
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
|
|
263
|
+
| [options.SerdeInfo.SerializationLibrary] | <code>String</code> | <code>'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'</code> | - Hard-wired by this shortcut. |
|
|
264
|
+
|
|
265
|
+
<a name="GluePrestoView"></a>
|
|
266
|
+
|
|
267
|
+
## GluePrestoView
|
|
268
|
+
Create a Glue Presto View.
|
|
269
|
+
|
|
270
|
+
**Kind**: global class
|
|
271
|
+
<a name="new_GluePrestoView_new"></a>
|
|
272
|
+
|
|
273
|
+
### new GluePrestoView(options)
|
|
274
|
+
|
|
275
|
+
| Param | Type | Default | Description |
|
|
276
|
+
| --- | --- | --- | --- |
|
|
277
|
+
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
|
|
278
|
+
| options.OriginalSql | <code>String</code> | | The SQL query that defines the view. |
|
|
279
|
+
| [options.TableType] | <code>String</code> | <code>'VIRTUAL_VIEW'</code> | Hard-wired by this shortcut. |
|
|
280
|
+
|
|
281
|
+
<a name="GlueSparkView"></a>
|
|
282
|
+
|
|
283
|
+
## GlueSparkView
|
|
284
|
+
Create a Glue Presto View.
|
|
137
285
|
|
|
138
|
-
|
|
286
|
+
**Kind**: global class
|
|
287
|
+
<a name="new_GlueSparkView_new"></a>
|
|
139
288
|
|
|
140
|
-
|
|
289
|
+
### new GlueSparkView(options)
|
|
141
290
|
|
|
142
|
-
|
|
143
|
-
|
|
291
|
+
| Param | Type | Default | Description |
|
|
292
|
+
| --- | --- | --- | --- |
|
|
293
|
+
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
|
|
294
|
+
| options.OriginalSql | <code>String</code> | | The SQL query that defines the view. |
|
|
295
|
+
| [options.TableType] | <code>String</code> | <code>'VIRTUAL_VIEW'</code> | Hard-wired by this shortcut. |
|
|
144
296
|
|
|
145
|
-
|
|
297
|
+
<a name="GlueTable"></a>
|
|
146
298
|
|
|
147
|
-
|
|
299
|
+
## GlueTable
|
|
300
|
+
Create a Glue Table.
|
|
301
|
+
|
|
302
|
+
Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:
|
|
303
|
+
- [GlueJsonTable](#gluejsontable)
|
|
304
|
+
- [GlueOrcTable](#glueorctable)
|
|
305
|
+
|
|
306
|
+
**Kind**: global class
|
|
307
|
+
<a name="new_GlueTable_new"></a>
|
|
308
|
+
|
|
309
|
+
### new GlueTable(options)
|
|
310
|
+
|
|
311
|
+
| Param | Type | Default | Description |
|
|
312
|
+
| --- | --- | --- | --- |
|
|
313
|
+
| options | <code>Object</code> | | Options. |
|
|
314
|
+
| options.LogicalName | <code>String</code> | | The logical name of the Glue Table within the CloudFormation template. |
|
|
315
|
+
| options.Name | <code>String</code> | | The name of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-name). |
|
|
316
|
+
| options.DatabaseName | <code>String</code> | | The name of the database the table resides in. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-databasename). |
|
|
317
|
+
| options.Columns | <code>Array.<Object></code> | | List of the table's columns. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-columns). |
|
|
318
|
+
| [options.CatalogId] | <code>String</code> | <code>AccountId</code> | The AWS account ID for the account in which to create the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-catalogid). |
|
|
319
|
+
| [options.Owner] | <code>String</code> | | The table owner. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-owner). |
|
|
320
|
+
| [options.Parameters] | <code>Object</code> | | Table parameters. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters). |
|
|
321
|
+
| [options.PartitionKeys] | <code>Array.<String></code> | <code>[]</code> | List of partitioning columns. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-partitionkeys). |
|
|
322
|
+
| [options.Description] | <code>String</code> | <code>'Created by the ${AWS::StackName} CloudFormation stack'</code> | The description of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-description). |
|
|
323
|
+
| [options.Retention] | <code>Number</code> | | Retention time for the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-retention). |
|
|
324
|
+
| [options.TableType] | <code>String</code> | | The type of this table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-tabletype). |
|
|
325
|
+
| [options.ViewExpandedText] | <code>String</code> | | The expanded text of the view. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-viewexpandedtext). |
|
|
326
|
+
| [options.ViewOriginalText] | <code>String</code> | | The original text of the view. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-vieworiginaltext). |
|
|
327
|
+
| [options.BucketColumns] | <code>Array.<String></code> | | List of bucketing columns. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-bucketcolumns). |
|
|
328
|
+
| [options.Compressed] | <code>Boolean</code> | <code>false</code> | Whether the data is compressed. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-compressed). |
|
|
329
|
+
| [options.InputFormat] | <code>String</code> | | The table's input format. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-inputformat). |
|
|
330
|
+
| [options.Location] | <code>String</code> | <code>''</code> | The physical location of the table. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location). |
|
|
331
|
+
| [options.NumberOfBuckets] | <code>Number</code> | <code>0</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-numberofbuckets). |
|
|
332
|
+
| [options.OutputFormat] | <code>String</code> | | The table's output format. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-outputformat). |
|
|
333
|
+
| [options.StorageParameters] | <code>Object</code> | | Storage parameters. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-parameters). |
|
|
334
|
+
| [options.SerdeInfo] | <code>Object</code> | <code>{}</code> | The serialization/deserialization information. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-serdeinfo). |
|
|
335
|
+
| [options.SkewedInfo] | <code>Object</code> | | Frequent value information. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-skewedinfo). |
|
|
336
|
+
| [options.SortColumns] | <code>Array.<Object></code> | | List specifying the sort order. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-sortcolumns). |
|
|
337
|
+
| [options.StoredAsSubDirectories] | <code>Boolean</code> | <code>true</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-storedasdubdirectories). |
|
|
338
|
+
| [options.Condition] | <code>String</code> | | If there is a `Condition` defined in the template that should control whether to create this database, specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html). |
|
|
339
|
+
| [options.DependsOn] | <code>String</code> | | Specify a stack resource dependency to this database. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html). |
|
|
340
|
+
|
|
341
|
+
**Example**
|
|
342
|
+
```js
|
|
148
343
|
const cf = require('@mapbox/cloudfriend');
|
|
149
344
|
|
|
150
345
|
const myTemplate = { ... };
|
|
151
346
|
|
|
152
|
-
const
|
|
347
|
+
const table = new cf.shortcuts.GlueTable({
|
|
348
|
+
LogicalName: 'MyTable',
|
|
349
|
+
DatabaseName: 'my_database',
|
|
350
|
+
Name: 'my_table',
|
|
351
|
+
Columns: [
|
|
352
|
+
{ Name: 'column_name', Type: 'string', Comment: 'my_column description' }
|
|
353
|
+
]
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
module.exports = cf.merge(myTemplate, table);
|
|
357
|
+
```
|
|
358
|
+
<a name="KinesisFirehoseBase"></a>
|
|
359
|
+
|
|
360
|
+
## KinesisFirehoseBase
|
|
361
|
+
Base class for creating a Kinesis Firehouse that can receive records
|
|
362
|
+
by direct put or by consuming a Kinesis Stream.
|
|
363
|
+
Each implementing subclass enables writing to a specific destination.
|
|
364
|
+
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
|
|
365
|
+
a policy allowing records to be delivered to the delivery stream.
|
|
366
|
+
|
|
367
|
+
**Kind**: global class
|
|
368
|
+
<a name="new_KinesisFirehoseBase_new"></a>
|
|
369
|
+
|
|
370
|
+
### new KinesisFirehoseBase(options)
|
|
371
|
+
|
|
372
|
+
| Param | Type | Description |
|
|
373
|
+
| --- | --- | --- |
|
|
374
|
+
| options | <code>Object</code> | Options. |
|
|
375
|
+
| options.LogicalName | <code>String</code> | The logical name of the Kinesis Firehouse delivery stream within the CloudFormation template. This is also used to construct the logical names of the other resources. |
|
|
376
|
+
| [options.KinesisStreamARN] | <code>String</code> \| <code>Object</code> | The ARN of a source Kinesis Stream. |
|
|
377
|
+
|
|
378
|
+
<a name="Lambda"></a>
|
|
379
|
+
|
|
380
|
+
## Lambda
|
|
381
|
+
Baseline CloudFormation resources involved in a Lambda Function. Creates a
|
|
382
|
+
Log Group, a Role, an Alarm on function errors, and the Lambda Function itself.
|
|
383
|
+
|
|
384
|
+
**Kind**: global class
|
|
385
|
+
<a name="new_Lambda_new"></a>
|
|
386
|
+
|
|
387
|
+
### new Lambda(options)
|
|
388
|
+
|
|
389
|
+
| Param | Type | Default | Description |
|
|
390
|
+
| --- | --- | --- | --- |
|
|
391
|
+
| options | <code>Object</code> | | Options. |
|
|
392
|
+
| options.LogicalName | <code>String</code> | | The logical name of the Lambda function within the CloudFormation template. This is used to construct the logical names of the other resources, as well as the Lambda function's name. |
|
|
393
|
+
| options.Code | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html). |
|
|
394
|
+
| [options.DeadLetterConfig] | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig). |
|
|
395
|
+
| [options.Description] | <code>String</code> | <code>'${logical name} in the ${stack name} stack'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description). |
|
|
396
|
+
| [options.Environment] | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment). |
|
|
397
|
+
| [options.FunctionName] | <code>String</code> | <code>'${stack name}-${logical name}'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname). |
|
|
398
|
+
| [options.Handler] | <code>String</code> | <code>'index.handler'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler). |
|
|
399
|
+
| [options.KmsKeyArn] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn). |
|
|
400
|
+
| [options.Layers] | <code>Array.<String></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers). |
|
|
401
|
+
| [options.MemorySize] | <code>Number</code> | <code>128</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize). |
|
|
402
|
+
| [options.ReservedConcurrentExecutions] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-reservedconcurrentexecutions). |
|
|
403
|
+
| [options.Runtime] | <code>String</code> | <code>'nodejs16.x'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime). |
|
|
404
|
+
| [options.Tags] | <code>Array.<Object></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags). |
|
|
405
|
+
| [options.Timeout] | <code>Number</code> | <code>300</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout). |
|
|
406
|
+
| [options.TracingConfig] | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig). |
|
|
407
|
+
| [options.VpcConfig] | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig). |
|
|
408
|
+
| [options.Condition] | <code>String</code> | | If there is a `Condition` defined in the template that should control whether to create this Lambda function, specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html). |
|
|
409
|
+
| [options.DependsOn] | <code>String</code> | | Specify a stack resource dependency to this Lambda function. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html). |
|
|
410
|
+
| [options.Statement] | <code>Array.<Object></code> | <code>[]</code> | Policy statements that will be added to a generated IAM role defining the permissions your Lambda function needs to run. _Do not use this option when specifying your own role via RoleArn._ |
|
|
411
|
+
| [options.RoleArn] | <code>String</code> | | If specified, the Lambda function will use this role instead of creating a new role. _If this option is specified, do not use the Statement option; add the permissions you need to your Role directly._ |
|
|
412
|
+
| [options.AlarmName] | <code>String</code> | <code>'${stack name}-${logical name}-Errors-${region}'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname). |
|
|
413
|
+
| [options.AlarmDescription] | <code>String</code> | <code>'Error alarm for ${stack name}-${logical name} lambda function in ${stack name} stack'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription). |
|
|
414
|
+
| [options.AlarmActions] | <code>Array.<String></code> | <code>[]</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions). |
|
|
415
|
+
| [options.Period] | <code>Number</code> | <code>60</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-period). |
|
|
416
|
+
| [options.EvaluationPeriods] | <code>Number</code> | <code>1</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluationperiods). |
|
|
417
|
+
| [options.Statistic] | <code>String</code> | <code>'Sum'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic). |
|
|
418
|
+
| [options.DatapointsToAlarm] | <code>Number</code> | <code>1</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarm-datapointstoalarm). |
|
|
419
|
+
| [options.Threshold] | <code>Number</code> | <code>0</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold). |
|
|
420
|
+
| [options.ComparisonOperator] | <code>String</code> | <code>'GreaterThanThreshold'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator). |
|
|
421
|
+
| [options.TreatMissingData] | <code>String</code> | <code>'notBreaching'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata). |
|
|
422
|
+
| [options.EvaluateLowSampleCountPercentile] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluatelowsamplecountpercentile). |
|
|
423
|
+
| [options.ExtendedStatistic] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-extendedstatistic)] |
|
|
424
|
+
| [options.OKActions] | <code>Array.<String></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions). |
|
|
425
|
+
|
|
426
|
+
**Example**
|
|
427
|
+
```js
|
|
428
|
+
const cf = require('@mapbox/cloudfriend');
|
|
429
|
+
|
|
430
|
+
const myTemplate = { ... };
|
|
431
|
+
|
|
432
|
+
const lambda = new cf.shortcuts.Lambda({
|
|
153
433
|
LogicalName: 'MyLambda',
|
|
154
434
|
Code: {
|
|
155
435
|
S3Bucket: 'my-code-bucket',
|
|
156
436
|
S3Key: 'path/to/code.zip'
|
|
157
|
-
}
|
|
158
|
-
ScheduleExpression: 'cron(45 * * * ? *)',
|
|
437
|
+
}
|
|
159
438
|
});
|
|
160
439
|
|
|
161
440
|
module.exports = cf.merge(myTemplate, lambda);
|
|
162
441
|
```
|
|
442
|
+
<a name="LogSubscriptionLambda"></a>
|
|
163
443
|
|
|
164
|
-
##
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
A Lambda function that runs in reaction to a CloudWatch Event. Includes
|
|
169
|
-
a LogGroup, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
|
|
170
|
-
a Lambda permission.
|
|
171
|
-
|
|
172
|
-
### Parameters
|
|
444
|
+
## LogSubscriptionLambda
|
|
445
|
+
A Lambda function that runs in response to a log subscription filter.
|
|
446
|
+
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
|
|
447
|
+
and a Lambda permission.
|
|
173
448
|
|
|
174
|
-
|
|
175
|
-
|
|
449
|
+
**Kind**: global class
|
|
450
|
+
<a name="new_LogSubscriptionLambda_new"></a>
|
|
176
451
|
|
|
177
|
-
|
|
178
|
-
* `options.State` **[String][60]** See [AWS documentation][94]. (optional, default `'ENABLED'`)
|
|
452
|
+
### new LogSubscriptionLambda(options)
|
|
179
453
|
|
|
180
|
-
|
|
454
|
+
| Param | Type | Default | Description |
|
|
455
|
+
| --- | --- | --- | --- |
|
|
456
|
+
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
|
|
457
|
+
| options.LogGroupName | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-loggroupname). |
|
|
458
|
+
| [options.FilterPattern] | <code>String</code> | <code>''</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern). |
|
|
181
459
|
|
|
182
|
-
|
|
460
|
+
**Example**
|
|
461
|
+
```js
|
|
183
462
|
const cf = require('@mapbox/cloudfriend');
|
|
184
463
|
|
|
185
464
|
const myTemplate = { ... };
|
|
186
465
|
|
|
187
|
-
const lambda = new cf.shortcuts.
|
|
466
|
+
const lambda = new cf.shortcuts.LogSubscriptionLambda({
|
|
188
467
|
LogicalName: 'MyLambda',
|
|
189
468
|
Code: {
|
|
190
469
|
S3Bucket: 'my-code-bucket',
|
|
191
470
|
S3Key: 'path/to/code.zip'
|
|
192
471
|
},
|
|
193
|
-
|
|
194
|
-
'detail-type': ['AWS Console Sign In via CloudTrail'],
|
|
195
|
-
detail: {
|
|
196
|
-
eventSource: ['signin.amazonaws.com'],
|
|
197
|
-
eventName: ['ConsoleLogin']
|
|
198
|
-
}
|
|
199
|
-
}
|
|
472
|
+
LogGroupName: 'my-log-group'
|
|
200
473
|
});
|
|
201
474
|
|
|
202
475
|
module.exports = cf.merge(myTemplate, lambda);
|
|
203
476
|
```
|
|
477
|
+
<a name="QueueLambda"></a>
|
|
204
478
|
|
|
205
479
|
## QueueLambda
|
|
206
|
-
|
|
207
|
-
**Extends Lambda**
|
|
208
|
-
|
|
209
480
|
A Lambda function that runs in response to messages in an SQS queue.
|
|
210
481
|
Includes a Log Group, a Role, an Alarm on function errors, and an event source
|
|
211
482
|
mapping.
|
|
212
483
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
|
|
484
|
+
**Kind**: global class
|
|
485
|
+
<a name="new_QueueLambda_new"></a>
|
|
216
486
|
|
|
217
|
-
|
|
218
|
-
* `options.ReservedConcurrentExecutions` **[Number][70]** See [AWS documentation][72].
|
|
219
|
-
* `options.BatchSize` **[Number][70]** See [AWS documentation][97]. (optional, default `1`)
|
|
487
|
+
### new QueueLambda(options)
|
|
220
488
|
|
|
221
|
-
|
|
489
|
+
| Param | Type | Default | Description |
|
|
490
|
+
| --- | --- | --- | --- |
|
|
491
|
+
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
|
|
492
|
+
| options.EventSourceArn | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn). |
|
|
493
|
+
| options.ReservedConcurrentExecutions | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-reservedconcurrentexecutions). |
|
|
494
|
+
| [options.BatchSize] | <code>Number</code> | <code>1</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize). |
|
|
222
495
|
|
|
223
|
-
|
|
496
|
+
**Example**
|
|
497
|
+
```js
|
|
224
498
|
const cf = require('@mapbox/cloudfriend');
|
|
225
499
|
|
|
226
500
|
const myTemplate = { ... };
|
|
@@ -237,73 +511,82 @@ const lambda = new cf.shortcuts.QueueLambda({
|
|
|
237
511
|
|
|
238
512
|
module.exports = cf.merge(myTemplate, lambda);
|
|
239
513
|
```
|
|
514
|
+
<a name="Queue"></a>
|
|
240
515
|
|
|
241
|
-
##
|
|
242
|
-
|
|
243
|
-
**Extends Lambda**
|
|
244
|
-
|
|
245
|
-
A Lambda function that runs in response to events in a DynamoDB or Kinesis
|
|
246
|
-
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
|
|
247
|
-
source mapping.
|
|
248
|
-
|
|
249
|
-
### Parameters
|
|
250
|
-
|
|
251
|
-
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
|
|
252
|
-
|
|
253
|
-
* `options.EventSourceArn` **[String][60]** See [AWS documentation][96].
|
|
254
|
-
* `options.BatchSize` **[Number][70]** See [AWS documentation][97]. (optional, default `1`)
|
|
255
|
-
* `options.MaximumBatchingWindowInSeconds` **[Number][70]** See [AWS documentation][98]. (optional, default `undefined`)
|
|
256
|
-
* `options.Enabled` **[Boolean][99]** See [AWS documentation][100]. (optional, default `true`)
|
|
257
|
-
* `options.StartingPosition` **[String][60]** See [AWS documentation][101]. (optional, default `'LATEST'`)
|
|
516
|
+
## Queue
|
|
517
|
+
Creates an SQS queue with an attached dead-letter queue.
|
|
258
518
|
|
|
259
|
-
|
|
519
|
+
Standard (non-FIFO) queues can receive messages through an SNS topic. The
|
|
520
|
+
shortcut either creates a new SNS topic that can be used for sending messages
|
|
521
|
+
into the queue, or subscribes the queue to an existing SNS topic provided
|
|
522
|
+
with the `ExistingTopicArn` option. For FIFO queues, no SNS topic is created
|
|
523
|
+
and `ExistingTopicArn` is ignored.
|
|
260
524
|
|
|
261
|
-
|
|
525
|
+
**Kind**: global class
|
|
526
|
+
<a name="new_Queue_new"></a>
|
|
527
|
+
|
|
528
|
+
### new Queue(options)
|
|
529
|
+
|
|
530
|
+
| Param | Type | Default | Description |
|
|
531
|
+
| --- | --- | --- | --- |
|
|
532
|
+
| options | <code>Object</code> | | Options. |
|
|
533
|
+
| options.LogicalName | <code>String</code> | | The logical name of the SQS queue within the CloudFormation template. This is also used to construct the logical names of the other resources. |
|
|
534
|
+
| [options.VisibilityTimeout] | <code>Number</code> | <code>300</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout). |
|
|
535
|
+
| [options.maxReceiveCount] | <code>Number</code> | <code>10</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues-redrivepolicy.html#aws-sqs-queue-redrivepolicy-maxcount). |
|
|
536
|
+
| [options.ContentBasedDeduplication] | <code>Boolean</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-contentbaseddeduplication). |
|
|
537
|
+
| [options.DelaySeconds] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-delayseconds). |
|
|
538
|
+
| [options.FifoQueue] | <code>Boolean</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-fifoqueue). |
|
|
539
|
+
| [options.KmsMasterKeyId] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsmasterkeyid). |
|
|
540
|
+
| [options.KmsDataKeyReusePeriodSeconds] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsdatakeyreuseperiodseconds). |
|
|
541
|
+
| [options.MaximumMessageSize] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-maxmsgsize). |
|
|
542
|
+
| [options.MessageRetentionPeriod] | <code>Number</code> | <code>1209600</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod). |
|
|
543
|
+
| [options.QueueName] | <code>String</code> | <code>'${stack name}-${logical name}'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-name). If `FifoQueue` is `true`, the suffix `.fifo` will be added to the queue name. |
|
|
544
|
+
| [options.ReceiveMessageWaitTimeSeconds] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-receivemsgwaittime). |
|
|
545
|
+
| [options.Condition] | <code>String</code> | | If there is a `Condition` defined in the template that should control whether to create this SQS queue, specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html). |
|
|
546
|
+
| [options.DependsOn] | <code>String</code> | | Specify a stack resource dependency to this SQS queue. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html). |
|
|
547
|
+
| [options.ExistingTopicArn] | <code>String</code> | | Specify an SNS topic ARN to subscribe the queue to. If this option is provided, `TopicName` is irrelevant because no new topic is created. This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics. |
|
|
548
|
+
| [options.TopicName] | <code>String</code> | <code>'${stack name}-${logical name}'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-name). This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics. |
|
|
549
|
+
| [options.DisplayName] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-displayname). |
|
|
550
|
+
| [options.DeadLetterVisibilityTimeout] | <code>Number</code> | <code>300</code> | [VisibilityTimeout](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout) for the dead-letter queue. |
|
|
551
|
+
|
|
552
|
+
**Example**
|
|
553
|
+
```js
|
|
262
554
|
const cf = require('@mapbox/cloudfriend');
|
|
263
555
|
|
|
264
556
|
const myTemplate = { ... };
|
|
265
557
|
|
|
266
|
-
const
|
|
267
|
-
LogicalName: '
|
|
268
|
-
Code: {
|
|
269
|
-
S3Bucket: 'my-code-bucket',
|
|
270
|
-
S3Key: 'path/to/code.zip'
|
|
271
|
-
},
|
|
272
|
-
EventSourceArn: cf.getAtt('MyStream', 'Arn')
|
|
558
|
+
const queue = new cf.shortcuts.Queue({
|
|
559
|
+
LogicalName: 'MyQueue'
|
|
273
560
|
});
|
|
274
561
|
|
|
275
|
-
module.exports = cf.merge(myTemplate,
|
|
562
|
+
module.exports = cf.merge(myTemplate, queue);
|
|
276
563
|
```
|
|
564
|
+
<a name="Role"></a>
|
|
277
565
|
|
|
278
566
|
## Role
|
|
279
|
-
|
|
280
567
|
Create an IAM role.
|
|
281
568
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
### Examples
|
|
305
|
-
|
|
306
|
-
```javascript
|
|
569
|
+
**Kind**: global class
|
|
570
|
+
<a name="new_Role_new"></a>
|
|
571
|
+
|
|
572
|
+
### new Role(options)
|
|
573
|
+
|
|
574
|
+
| Param | Type | Default | Description |
|
|
575
|
+
| --- | --- | --- | --- |
|
|
576
|
+
| options | <code>Object</code> | | Options. |
|
|
577
|
+
| options.LogicalName | <code>String</code> | | The logical name of the IAM role within the CloudFormation template. |
|
|
578
|
+
| options.AssumeRolePrincipals | <code>Array.<Object></code> | | An array of [principal objects](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) defining entities able to assume this role. Will be included in the role's [`AssumeRolePolicyDocument`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html?shortFooter=true#cfn-iam-role-assumerolepolicydocument). |
|
|
579
|
+
| [options.Statement] | <code>Array.<Object></code> | <code>[]</code> | An array of permissions statements to be included in the [`PolicyDocument`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html#cfn-iam-policies-policydocument). |
|
|
580
|
+
| [options.ManagedPolicyArns] | <code>Array.<String></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-managepolicyarns). |
|
|
581
|
+
| [options.MaxSessionDuration] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-maxsessionduration). |
|
|
582
|
+
| [options.Path] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-path). |
|
|
583
|
+
| [options.RoleName] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-rolename). |
|
|
584
|
+
| [options.Tags] | <code>Array.<Object></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-tags). |
|
|
585
|
+
| [options.Condition] | <code>String</code> | | If there is a `Condition` defined in the template that should control whether to create this IAM role, specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html). |
|
|
586
|
+
| [options.DependsOn] | <code>String</code> | | Specify a stack resource dependency to this IAM role. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html). |
|
|
587
|
+
|
|
588
|
+
**Example**
|
|
589
|
+
```js
|
|
307
590
|
const cf = require('@mapbox/cloudfriend');
|
|
308
591
|
|
|
309
592
|
const myTemplate = { ... };
|
|
@@ -324,65 +607,109 @@ const role = new cf.shortcuts.Role({
|
|
|
324
607
|
|
|
325
608
|
module.exports = cf.merge(myTemplate, role);
|
|
326
609
|
```
|
|
610
|
+
<a name="S3KinesisFirehose"></a>
|
|
327
611
|
|
|
328
|
-
##
|
|
612
|
+
## S3KinesisFirehose
|
|
613
|
+
Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
|
|
614
|
+
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
|
|
615
|
+
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
|
|
616
|
+
Also creates a CloudWatch alarm on the `DeliveryToS3.DataFreshness` metric -- the age
|
|
617
|
+
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
|
|
618
|
+
By default, if that metric exceeds double the `BufferingIntervalInSeconds`, the
|
|
619
|
+
alarm is triggered.
|
|
329
620
|
|
|
330
|
-
**
|
|
621
|
+
**Kind**: global class
|
|
622
|
+
<a name="new_S3KinesisFirehose_new"></a>
|
|
623
|
+
|
|
624
|
+
### new S3KinesisFirehose(options)
|
|
625
|
+
|
|
626
|
+
| Param | Type | Default | Description |
|
|
627
|
+
| --- | --- | --- | --- |
|
|
628
|
+
| options | <code>Object</code> | | Options. |
|
|
629
|
+
| options.LogicalName | <code>String</code> | | The logical name of the Kinesis Firehouse delivery stream within the CloudFormation template. This is also used to construct the logical names of the other resources. |
|
|
630
|
+
| options.DestinationBucket | <code>String</code> | | The name of the S3 bucket to write to. |
|
|
631
|
+
| [options.Prefix] | <code>String</code> | <code>'raw/${logical name}/'</code> | The prefix path (folder) within the DestinationBucket to write to. |
|
|
632
|
+
| [options.KinesisStreamARN] | <code>String</code> \| <code>Object</code> | | The ARN of a source Kinesis Stream. |
|
|
633
|
+
| [options.BufferingIntervalInSeconds] | <code>Number</code> | <code>900</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-intervalinseconds). |
|
|
634
|
+
| [options.BufferingSizeInMBs] | <code>Number</code> | <code>128</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-sizeinmbs). |
|
|
635
|
+
| [options.AlarmName] | <code>String</code> | <code>'${stack name}-${logical name}-Freshness-${region}'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname). |
|
|
636
|
+
| [options.AlarmDescription] | <code>String</code> | <code>'Freshness alarm for ${stack name}-${logical name} kinesis firehose in ${stack name} stack'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription). |
|
|
637
|
+
| [options.AlarmActions] | <code>Array.<String></code> | <code>[]</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions). |
|
|
638
|
+
| [options.Period] | <code>Number</code> | <code>60</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-period). |
|
|
639
|
+
| [options.EvaluationPeriods] | <code>Number</code> | <code>1</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluationperiods). |
|
|
640
|
+
| [options.Statistic] | <code>String</code> | <code>'Maximum'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic). |
|
|
641
|
+
| [options.Threshold] | <code>Number</code> | <code>(BufferingIntervalInSeconds * 2)</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold). |
|
|
642
|
+
| [options.ComparisonOperator] | <code>String</code> | <code>'GreaterThanThreshold'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator). |
|
|
643
|
+
| [options.TreatMissingData] | <code>String</code> | <code>'notBreaching'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata). |
|
|
644
|
+
| [options.EvaluateLowSampleCountPercentile] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluatelowsamplecountpercentile). |
|
|
645
|
+
| [options.ExtendedStatistic] | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-extendedstatistic)] |
|
|
646
|
+
| [options.OKActions] | <code>Array.<String></code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions). |
|
|
647
|
+
|
|
648
|
+
**Example**
|
|
649
|
+
```js
|
|
650
|
+
const cf = require('@mapbox/cloudfriend');
|
|
331
651
|
|
|
332
|
-
|
|
652
|
+
const myTemplate = { ... };
|
|
333
653
|
|
|
334
|
-
|
|
654
|
+
const firehose = new cf.shortcuts.S3KinesisFirehose({
|
|
655
|
+
LogicalName: 'MyKinesisFirehose',
|
|
656
|
+
DestinationBucket: 'mah-bukkit'
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
module.exports = cf.merge(myTemplate, firehose);
|
|
660
|
+
```
|
|
661
|
+
<a name="ScheduledLambda"></a>
|
|
662
|
+
|
|
663
|
+
## ScheduledLambda
|
|
664
|
+
A Lambda function that runs on in response to a CloudWatch Event. Includes
|
|
665
|
+
a Log Group, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
|
|
666
|
+
a Lambda permission.
|
|
335
667
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
an `AssumeRolePrincipals` attribute, but do need to include the following
|
|
339
|
-
additional attributes:
|
|
668
|
+
**Kind**: global class
|
|
669
|
+
<a name="new_ScheduledLambda_new"></a>
|
|
340
670
|
|
|
341
|
-
|
|
342
|
-
assume this IAM Role. These could be account IDs (`123456789012`),
|
|
343
|
-
account ARNs (`arn:aws:iam::123456789012:root`), or CloudFormation intrinsic
|
|
344
|
-
function objects (`cf.sub('arn:aws:iam::${AccountIdParameter}:root')`).
|
|
671
|
+
### new ScheduledLambda(options)
|
|
345
672
|
|
|
346
|
-
|
|
673
|
+
| Param | Type | Default | Description |
|
|
674
|
+
| --- | --- | --- | --- |
|
|
675
|
+
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
|
|
676
|
+
| options.ScheduleExpression | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression). |
|
|
677
|
+
| [options.State] | <code>String</code> | <code>'ENABLED'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state). |
|
|
347
678
|
|
|
348
|
-
|
|
679
|
+
**Example**
|
|
680
|
+
```js
|
|
349
681
|
const cf = require('@mapbox/cloudfriend');
|
|
350
682
|
|
|
351
683
|
const myTemplate = { ... };
|
|
352
684
|
|
|
353
|
-
const
|
|
354
|
-
LogicalName: '
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
|
|
361
|
-
}
|
|
362
|
-
]
|
|
685
|
+
const lambda = new cf.shortcuts.ScheduledLambda({
|
|
686
|
+
LogicalName: 'MyLambda',
|
|
687
|
+
Code: {
|
|
688
|
+
S3Bucket: 'my-code-bucket',
|
|
689
|
+
S3Key: 'path/to/code.zip'
|
|
690
|
+
},
|
|
691
|
+
ScheduleExpression: 'cron(45 * * * ? *)',
|
|
363
692
|
});
|
|
364
693
|
|
|
365
|
-
module.exports = cf.merge(myTemplate,
|
|
694
|
+
module.exports = cf.merge(myTemplate, lambda);
|
|
366
695
|
```
|
|
696
|
+
<a name="ServiceRole"></a>
|
|
367
697
|
|
|
368
698
|
## ServiceRole
|
|
369
|
-
|
|
370
|
-
**Extends Role**
|
|
371
|
-
|
|
372
699
|
Create an IAM role that will be assumed by an AWS service, e.g. Lambda or ECS.
|
|
373
700
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
* `options` **[Object][59]** Extends
|
|
377
|
-
the options for [`Role`][16]. You do not need to provide
|
|
378
|
-
an `AssumeRolePrincipals` attribute, but do need to include the following
|
|
379
|
-
additional attributes:
|
|
701
|
+
**Kind**: global class
|
|
702
|
+
<a name="new_ServiceRole_new"></a>
|
|
380
703
|
|
|
381
|
-
|
|
704
|
+
### new ServiceRole(options)
|
|
382
705
|
|
|
383
|
-
|
|
706
|
+
| Param | Type | Description |
|
|
707
|
+
| --- | --- | --- |
|
|
708
|
+
| options | <code>Object</code> | Extends the options for [`Role`](#role). You do not need to provide an `AssumeRolePrincipals` attribute, but do need to include the following additional attributes: |
|
|
709
|
+
| options.Service | <code>String</code> | The name of the AWS service that will assume this role, e.g. `lambda`. |
|
|
384
710
|
|
|
385
|
-
|
|
711
|
+
**Example**
|
|
712
|
+
```js
|
|
386
713
|
const cf = require('@mapbox/cloudfriend');
|
|
387
714
|
|
|
388
715
|
const myTemplate = { ... };
|
|
@@ -401,789 +728,41 @@ const role = new cf.shortcuts.ServiceRole({
|
|
|
401
728
|
|
|
402
729
|
module.exports = cf.merge(myTemplate, role);
|
|
403
730
|
```
|
|
731
|
+
<a name="StreamLambda"></a>
|
|
404
732
|
|
|
405
|
-
##
|
|
733
|
+
## StreamLambda
|
|
734
|
+
A Lambda function that runs in response to events in a DynamoDB or Kinesis
|
|
735
|
+
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
|
|
736
|
+
source mapping.
|
|
406
737
|
|
|
407
|
-
|
|
738
|
+
**Kind**: global class
|
|
739
|
+
<a name="new_StreamLambda_new"></a>
|
|
408
740
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
741
|
+
### new StreamLambda(options)
|
|
742
|
+
|
|
743
|
+
| Param | Type | Default | Description |
|
|
744
|
+
| --- | --- | --- | --- |
|
|
745
|
+
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
|
|
746
|
+
| options.EventSourceArn | <code>String</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn). |
|
|
747
|
+
| [options.BatchSize] | <code>Number</code> | <code>1</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize). |
|
|
748
|
+
| [options.MaximumBatchingWindowInSeconds] | <code>Number</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds). |
|
|
749
|
+
| [options.Enabled] | <code>Boolean</code> | <code>true</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled). |
|
|
750
|
+
| [options.StartingPosition] | <code>String</code> | <code>'LATEST'</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition). |
|
|
414
751
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
* `options` **[Object][59]** Options.
|
|
418
|
-
|
|
419
|
-
* `options.LogicalName` **[String][60]** The logical name of the SQS queue
|
|
420
|
-
within the CloudFormation template. This is also used to construct the logical
|
|
421
|
-
names of the other resources.
|
|
422
|
-
* `options.VisibilityTimeout` **[Number][70]** See [AWS documentation][110]. (optional, default `300`)
|
|
423
|
-
* `options.maxReceiveCount` **[Number][70]** See [AWS documentation][111]. (optional, default `10`)
|
|
424
|
-
* `options.ContentBasedDeduplication` **[Boolean][99]** See [AWS documentation][112]. (optional, default `undefined`)
|
|
425
|
-
* `options.DelaySeconds` **[Number][70]** See [AWS documentation][113]. (optional, default `undefined`)
|
|
426
|
-
* `options.FifoQueue` **[Boolean][99]** See [AWS documentation][114]. (optional, default `undefined`)
|
|
427
|
-
* `options.KmsMasterKeyId` **[String][60]** See [AWS documentation][115]. (optional, default `undefined`)
|
|
428
|
-
* `options.KmsDataKeyReusePeriodSeconds` **[Number][70]** See [AWS documentation][116]. (optional, default `undefined`)
|
|
429
|
-
* `options.MaximumMessageSize` **[Number][70]** See [AWS documentation][117]. (optional, default `undefined`)
|
|
430
|
-
* `options.MessageRetentionPeriod` **[Number][70]** See [AWS documentation][118]. (optional, default `1209600`)
|
|
431
|
-
* `options.QueueName` **[String][60]** See [AWS documentation][119].
|
|
432
|
-
If `FifoQueue` is `true`, the suffix `.fifo` will be added to the queue name. (optional, default `'${stack name}-${logical name}'`)
|
|
433
|
-
* `options.ReceiveMessageWaitTimeSeconds` **[Number][70]** See [AWS documentation][120]. (optional, default `undefined`)
|
|
434
|
-
* `options.Condition` **[String][60]** If there is a `Condition` defined
|
|
435
|
-
in the template that should control whether to create this SQS queue,
|
|
436
|
-
specify the name of the condition here. See [AWS documentation][78]. (optional, default `undefined`)
|
|
437
|
-
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
|
|
438
|
-
to this SQS queue. See [AWS documentation][79]. (optional, default `undefined`)
|
|
439
|
-
* `options.ExistingTopicArn` **[String][60]?** Specify an SNS topic ARN to subscribe the queue to.
|
|
440
|
-
If this option is provided, `TopicName` is irrelevant because no new topic is created.
|
|
441
|
-
This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics.
|
|
442
|
-
* `options.TopicName` **[String][60]** See [AWS documentation][121].
|
|
443
|
-
This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics. (optional, default `'${stack name}-${logical name}'`)
|
|
444
|
-
* `options.DisplayName` **[String][60]** See [AWS documentation][122]. (optional, default `undefined`)
|
|
445
|
-
* `options.DeadLetterVisibilityTimeout` **[Number][70]** [VisibilityTimeout][110] for the dead-letter queue. (optional, default `300`)
|
|
446
|
-
|
|
447
|
-
### Examples
|
|
448
|
-
|
|
449
|
-
```javascript
|
|
752
|
+
**Example**
|
|
753
|
+
```js
|
|
450
754
|
const cf = require('@mapbox/cloudfriend');
|
|
451
755
|
|
|
452
756
|
const myTemplate = { ... };
|
|
453
757
|
|
|
454
|
-
const
|
|
455
|
-
LogicalName: 'MyQueue'
|
|
456
|
-
});
|
|
457
|
-
|
|
458
|
-
module.exports = cf.merge(myTemplate, queue);
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
## S3KinesisFirehose
|
|
462
|
-
|
|
463
|
-
**Extends KinesisFirehoseBase**
|
|
464
|
-
|
|
465
|
-
Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
|
|
466
|
-
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
|
|
467
|
-
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
|
|
468
|
-
Also creates a CloudWatch alarm on the `DeliveryToS3.DataFreshness` metric -- the age
|
|
469
|
-
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
|
|
470
|
-
By default, if that metric exceeds double the `BufferingIntervalInSeconds`, the
|
|
471
|
-
alarm is triggered.
|
|
472
|
-
|
|
473
|
-
### Parameters
|
|
474
|
-
|
|
475
|
-
* `options` **[Object][59]** Options.
|
|
476
|
-
|
|
477
|
-
* `options.LogicalName` **[String][60]** The logical name of the Kinesis Firehouse delivery stream
|
|
478
|
-
within the CloudFormation template. This is also used to construct the logical
|
|
479
|
-
names of the other resources.
|
|
480
|
-
* `options.DestinationBucket` **[String][60]** The name of the S3 bucket to write to.
|
|
481
|
-
* `options.Prefix` **[String][60]** The prefix path (folder) within the DestinationBucket to write to. (optional, default `'raw/${logical name}/'`)
|
|
482
|
-
* `options.KinesisStreamARN` **([String][60] | [Object][59])** The ARN of a source Kinesis Stream. (optional, default `undefined`)
|
|
483
|
-
* `options.BufferingIntervalInSeconds` **[Number][70]** See [AWS documentation][123]. (optional, default `900`)
|
|
484
|
-
* `options.BufferingSizeInMBs` **[Number][70]** See [AWS documentation][124]. (optional, default `128`)
|
|
485
|
-
* `options.AlarmName` **[String][60]** See [AWS documentation][80]. (optional, default `'${stack name}-${logical name}-Freshness-${region}'`)
|
|
486
|
-
* `options.AlarmDescription` **[String][60]** See [AWS documentation][81]. (optional, default `'Freshness alarm for ${stack name}-${logical name} kinesis firehose in ${stack name} stack'`)
|
|
487
|
-
* `options.AlarmActions` **[Array][68]<[String][60]>** See [AWS documentation][82]. (optional, default `[]`)
|
|
488
|
-
* `options.Period` **[Number][70]** See [AWS documentation][83]. (optional, default `60`)
|
|
489
|
-
* `options.EvaluationPeriods` **[Number][70]** See [AWS documentation][84]. (optional, default `1`)
|
|
490
|
-
* `options.Statistic` **[String][60]** See [AWS documentation][85]. (optional, default `'Maximum'`)
|
|
491
|
-
* `options.Threshold` **[Number][70]** See [AWS documentation][87]. (optional, default `(BufferingIntervalInSeconds*2)`)
|
|
492
|
-
* `options.ComparisonOperator` **[String][60]** See [AWS documentation][88]. (optional, default `'GreaterThanThreshold'`)
|
|
493
|
-
* `options.TreatMissingData` **[String][60]** See [AWS documentation][89]. (optional, default `'notBreaching'`)
|
|
494
|
-
* `options.EvaluateLowSampleCountPercentile` **[String][60]** See [AWS documentation][90]. (optional, default `undefined`)
|
|
495
|
-
* `options.ExtendedStatistic` **[String][60]** See [AWS documentation][91]] (optional, default `undefined`)
|
|
496
|
-
* `options.OKActions` **[Array][68]<[String][60]>** See [AWS documentation][92]. (optional, default `undefined`)
|
|
497
|
-
|
|
498
|
-
### Examples
|
|
499
|
-
|
|
500
|
-
```javascript
|
|
501
|
-
const cf = require('@mapbox/cloudfriend');
|
|
502
|
-
|
|
503
|
-
const myTemplate = { ... };
|
|
504
|
-
|
|
505
|
-
const firehose = new cf.shortcuts.S3KinesisFirehose({
|
|
506
|
-
LogicalName: 'MyKinesisFirehose',
|
|
507
|
-
DestinationBucket: 'mah-bukkit'
|
|
508
|
-
});
|
|
509
|
-
|
|
510
|
-
module.exports = cf.merge(myTemplate, firehose);
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
## KinesisFirehoseBase
|
|
514
|
-
|
|
515
|
-
Base class for creating a Kinesis Firehouse that can receive records
|
|
516
|
-
by direct put or by consuming a Kinesis Stream.
|
|
517
|
-
Each implementing subclass enables writing to a specific destination.
|
|
518
|
-
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
|
|
519
|
-
a policy allowing records to be delivered to the delivery stream.
|
|
520
|
-
|
|
521
|
-
### Parameters
|
|
522
|
-
|
|
523
|
-
* `options` **[Object][59]** Options.
|
|
524
|
-
|
|
525
|
-
* `options.LogicalName` **[String][60]** The logical name of the Kinesis Firehouse delivery stream
|
|
526
|
-
within the CloudFormation template. This is also used to construct the logical
|
|
527
|
-
names of the other resources.
|
|
528
|
-
* `options.KinesisStreamARN` **([String][60] | [Object][59])** The ARN of a source Kinesis Stream. (optional, default `undefined`)
|
|
529
|
-
|
|
530
|
-
## GlueDatabase
|
|
531
|
-
|
|
532
|
-
Create a Glue Database.
|
|
533
|
-
|
|
534
|
-
### Parameters
|
|
535
|
-
|
|
536
|
-
* `options` **[Object][59]** Options.
|
|
537
|
-
|
|
538
|
-
* `options.LogicalName` **[String][60]** The logical name of the Glue Database within the CloudFormation template.
|
|
539
|
-
* `options.Name` **[String][60]** The name of the database. See [AWS documentation][125].
|
|
540
|
-
* `options.CatalogId` **[String][60]** The AWS account ID for the account in which to create the database. See [AWS documentation][126]. (optional, default `AccountId`)
|
|
541
|
-
* `options.Description` **[String][60]** The description of the database. See [AWS documentation][127]. (optional, default `'Created by the ${AWS::StackName} CloudFormation stack'`)
|
|
542
|
-
* `options.LocationUri` **[String][60]** The location of the database. See [AWS documentation][128]. (optional, default `undefined`)
|
|
543
|
-
* `options.Parameters` **[String][60]** Parameters of the database. See [AWS documentation][129]. (optional, default `undefined`)
|
|
544
|
-
* `options.Condition` **[String][60]** If there is a `Condition` defined
|
|
545
|
-
in the template that should control whether to create this database,
|
|
546
|
-
specify the name of the condition here. See [AWS documentation][78]. (optional, default `undefined`)
|
|
547
|
-
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
|
|
548
|
-
to this database. See [AWS documentation][79]. (optional, default `undefined`)
|
|
549
|
-
|
|
550
|
-
### Examples
|
|
551
|
-
|
|
552
|
-
```javascript
|
|
553
|
-
const cf = require('@mapbox/cloudfriend');
|
|
554
|
-
|
|
555
|
-
const myTemplate = { ... };
|
|
556
|
-
|
|
557
|
-
const db = new cf.shortcuts.GlueDatabase({
|
|
558
|
-
LogicalName: 'MyDatabase',
|
|
559
|
-
Name: 'my_database'
|
|
560
|
-
});
|
|
561
|
-
|
|
562
|
-
module.exports = cf.merge(myTemplate, db);
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
## GlueTable
|
|
566
|
-
|
|
567
|
-
Create a Glue Table.
|
|
568
|
-
|
|
569
|
-
Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:
|
|
570
|
-
|
|
571
|
-
* [GlueJsonTable][39]
|
|
572
|
-
* [GlueOrcTable][41]
|
|
573
|
-
|
|
574
|
-
### Parameters
|
|
575
|
-
|
|
576
|
-
* `options` **[Object][59]** Options.
|
|
577
|
-
|
|
578
|
-
* `options.LogicalName` **[String][60]** The logical name of the Glue Table within the CloudFormation template.
|
|
579
|
-
* `options.Name` **[String][60]** The name of the table. See [AWS documentation][130].
|
|
580
|
-
* `options.DatabaseName` **[String][60]** The name of the database the table
|
|
581
|
-
resides in. See [AWS documentation][131].
|
|
582
|
-
* `options.Columns` **[Array][68]<[Object][59]>** List of the table's columns. See [AWS documentation][132].
|
|
583
|
-
* `options.CatalogId` **[String][60]** The AWS account ID for the account in which to create the table. See [AWS documentation][133]. (optional, default `AccountId`)
|
|
584
|
-
* `options.Owner` **[String][60]** The table owner. See [AWS documentation][134]. (optional, default `undefined`)
|
|
585
|
-
* `options.Parameters` **[Object][59]** Table parameters. See [AWS documentation][135]. (optional, default `undefined`)
|
|
586
|
-
* `options.PartitionKeys` **[Array][68]<[String][60]>** List of partitioning columns. See [AWS documentation][136]. (optional, default `[]`)
|
|
587
|
-
* `options.Description` **[String][60]** The description of the table. See [AWS documentation][137]. (optional, default `'Created by the ${AWS::StackName} CloudFormation stack'`)
|
|
588
|
-
* `options.Retention` **[Number][70]** Retention time for the table. See [AWS documentation][138]. (optional, default `undefined`)
|
|
589
|
-
* `options.TableType` **[String][60]** The type of this table. See [AWS documentation][139]. (optional, default `undefined`)
|
|
590
|
-
* `options.ViewExpandedText` **[String][60]** The expanded text of the view. See [AWS documentation][140]. (optional, default `undefined`)
|
|
591
|
-
* `options.ViewOriginalText` **[String][60]** The original text of the view. See [AWS documentation][141]. (optional, default `undefined`)
|
|
592
|
-
* `options.BucketColumns` **[Array][68]<[String][60]>** List of bucketing columns. See [AWS documentation][142]. (optional, default `undefined`)
|
|
593
|
-
* `options.Compressed` **[Boolean][99]** Whether the data is compressed. See [AWS documentation][143]. (optional, default `false`)
|
|
594
|
-
* `options.InputFormat` **[String][60]** The table's input format. See [AWS documentation][144]. (optional, default `undefined`)
|
|
595
|
-
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145]. (optional, default `''`)
|
|
596
|
-
* `options.NumberOfBuckets` **[Number][70]** See [AWS documentation][146]. (optional, default `0`)
|
|
597
|
-
* `options.OutputFormat` **[String][60]** The table's output format. See [AWS documentation][147]. (optional, default `undefined`)
|
|
598
|
-
* `options.StorageParameters` **[Object][59]** Storage parameters. See [AWS documentation][148]. (optional, default `undefined`)
|
|
599
|
-
* `options.SerdeInfo` **[Object][59]** The serialization/deserialization information. See [AWS documentation][149]. (optional, default `{}`)
|
|
600
|
-
* `options.SkewedInfo` **[Object][59]** Frequent value information. See [AWS documentation][150]. (optional, default `undefined`)
|
|
601
|
-
* `options.SortColumns` **[Array][68]<[Object][59]>** List specifying the sort order. See [AWS documentation][151]. (optional, default `undefined`)
|
|
602
|
-
* `options.StoredAsSubDirectories` **[Boolean][99]** See [AWS documentation][152]. (optional, default `true`)
|
|
603
|
-
* `options.Condition` **[String][60]** If there is a `Condition` defined
|
|
604
|
-
in the template that should control whether to create this database,
|
|
605
|
-
specify the name of the condition here. See [AWS documentation][78]. (optional, default `undefined`)
|
|
606
|
-
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
|
|
607
|
-
to this database. See [AWS documentation][79]. (optional, default `undefined`)
|
|
608
|
-
|
|
609
|
-
### Examples
|
|
610
|
-
|
|
611
|
-
```javascript
|
|
612
|
-
const cf = require('@mapbox/cloudfriend');
|
|
613
|
-
|
|
614
|
-
const myTemplate = { ... };
|
|
615
|
-
|
|
616
|
-
const table = new cf.shortcuts.GlueTable({
|
|
617
|
-
LogicalName: 'MyTable',
|
|
618
|
-
DatabaseName: 'my_database',
|
|
619
|
-
Name: 'my_table',
|
|
620
|
-
Columns: [
|
|
621
|
-
{ Name: 'column_name', Type: 'string', Comment: 'my_column description' }
|
|
622
|
-
]
|
|
623
|
-
});
|
|
624
|
-
|
|
625
|
-
module.exports = cf.merge(myTemplate, table);
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
## GlueJsonTable
|
|
629
|
-
|
|
630
|
-
**Extends GlueTable**
|
|
631
|
-
|
|
632
|
-
Create a Glue Table backed by line-delimited JSON files on S3.
|
|
633
|
-
|
|
634
|
-
### Parameters
|
|
635
|
-
|
|
636
|
-
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
|
|
637
|
-
|
|
638
|
-
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145].
|
|
639
|
-
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'EXTERNAL_TABLE'`)
|
|
640
|
-
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.mapred.TextInputFormat'`)
|
|
641
|
-
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'`)
|
|
642
|
-
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
|
|
643
|
-
|
|
644
|
-
* `options.SerdeInfo.SerializationLibrary` **[Object][59]** Hard-wired by this shortcut. (optional, default `'org.openx.data.jsonserde.JsonSerDe'`)
|
|
645
|
-
|
|
646
|
-
## GlueOrcTable
|
|
647
|
-
|
|
648
|
-
**Extends GlueTable**
|
|
649
|
-
|
|
650
|
-
Create a Glue Table backed by ORC files on S3.
|
|
651
|
-
|
|
652
|
-
### Parameters
|
|
653
|
-
|
|
654
|
-
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
|
|
655
|
-
|
|
656
|
-
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145].
|
|
657
|
-
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'EXTERNAL_TABLE'`)
|
|
658
|
-
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'`)
|
|
659
|
-
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'`)
|
|
660
|
-
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
|
|
661
|
-
|
|
662
|
-
* `options.SerdeInfo.SerializationLibrary` **[Object][59]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcSerde'`)
|
|
663
|
-
|
|
664
|
-
## GlueParquetTable
|
|
665
|
-
|
|
666
|
-
**Extends GlueTable**
|
|
667
|
-
|
|
668
|
-
Create a Glue table backed by Parquet files on S3.
|
|
669
|
-
|
|
670
|
-
### Parameters
|
|
671
|
-
|
|
672
|
-
* `options` **[Object][59]** Accepts the same options as cloudfriend's
|
|
673
|
-
[`GlueTable`][153],
|
|
674
|
-
though the following additional attributes are either required or hard-wired:
|
|
675
|
-
|
|
676
|
-
* `options.Location` **[String][60]** The physical location of the table. See
|
|
677
|
-
[AWS
|
|
678
|
-
documentation][145].
|
|
679
|
-
* `options.TableType` **[String][60]** Hard-wired by this
|
|
680
|
-
shortcut. (optional, default `'EXTERNAL_TABLE'`)
|
|
681
|
-
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'`)
|
|
682
|
-
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'`)
|
|
683
|
-
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
|
|
684
|
-
|
|
685
|
-
* `options.SerdeInfo.SerializationLibrary` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'`)
|
|
686
|
-
|
|
687
|
-
## GluePrestoView
|
|
688
|
-
|
|
689
|
-
**Extends GlueTable**
|
|
690
|
-
|
|
691
|
-
Create a Glue Presto View.
|
|
692
|
-
|
|
693
|
-
### Parameters
|
|
694
|
-
|
|
695
|
-
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
|
|
696
|
-
|
|
697
|
-
* `options.OriginalSql` **[String][60]** The SQL query that defines the view.
|
|
698
|
-
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'VIRTUAL_VIEW'`)
|
|
699
|
-
|
|
700
|
-
## GlueSparkView
|
|
701
|
-
|
|
702
|
-
**Extends GlueTable**
|
|
703
|
-
|
|
704
|
-
Create a Glue Presto View.
|
|
705
|
-
|
|
706
|
-
### Parameters
|
|
707
|
-
|
|
708
|
-
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
|
|
709
|
-
|
|
710
|
-
* `options.OriginalSql` **[String][60]** The SQL query that defines the view.
|
|
711
|
-
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'VIRTUAL_VIEW'`)
|
|
712
|
-
|
|
713
|
-
## hookshot.Passthrough
|
|
714
|
-
|
|
715
|
-
The hookshot.Passthrough class defines resources that set up a single API Gateway
|
|
716
|
-
endpoint that responds to `POST` and `OPTIONS` requests. You are expected to
|
|
717
|
-
provide a Lambda function that will receive the request, and return some
|
|
718
|
-
response to the caller.
|
|
719
|
-
|
|
720
|
-
Note that in this case, your Lambda function will receive every HTTP `POST`
|
|
721
|
-
request that arrives at the API Gateway URL that hookshot helped you create.
|
|
722
|
-
You are responsible for any authentication that should be performed against
|
|
723
|
-
incoming requests.
|
|
724
|
-
|
|
725
|
-
Your Lambda function will receive an event object which includes the request
|
|
726
|
-
method, headers, and body, as well as other data specific to the API Gateway
|
|
727
|
-
endpoint created by hookshot. See [AWS documentation here][154]
|
|
728
|
-
for a full description of the incoming data.
|
|
729
|
-
|
|
730
|
-
To work properly, **your lambda function must return a data object
|
|
731
|
-
matching in a specific JSON format**. Again, see [AWS documentation for a full description][155].
|
|
732
|
-
|
|
733
|
-
Your API Gateway endpoint will allow cross-origin resource
|
|
734
|
-
sharing (CORS) required by requests from any webpage. Preflight `OPTIONS`
|
|
735
|
-
requests will receive a `200` response with CORS headers. And the response
|
|
736
|
-
you return from your Lambda function will be modified to include CORS headers.
|
|
737
|
-
|
|
738
|
-
The generated template's `Outputs` will include the URL for the API Gateway endpoint,
|
|
739
|
-
and a random string that can be used as a shared secret.
|
|
740
|
-
|
|
741
|
-
### Parameters
|
|
742
|
-
|
|
743
|
-
* `Prefix` **[String][60]** This will be used to prefix the set of CloudFormation
|
|
744
|
-
resources created by this shortcut.
|
|
745
|
-
* `PassthroughTo` **[String][60]** The logical name of the Lambda function that you
|
|
746
|
-
have written which will receive a request and generate a response to provide
|
|
747
|
-
to the caller.
|
|
748
|
-
* `LoggingLevel` **[String][60]** One of `OFF`, `INFO`, or `ERROR`. Logs are delivered
|
|
749
|
-
to a CloudWatch Log Group named `API-Gateway-Execution-Logs_{rest-api-id}/hookshot`. (optional, default `'OFF'`)
|
|
750
|
-
* `DataTraceEnabled` **[Boolean][99]** Set to `true` to enable full request/response
|
|
751
|
-
logging in the API's logs. (optional, default `false`)
|
|
752
|
-
* `MetricsEnabled` **[Boolean][99]** Set to `true` to enable additional metrics in CloudWatch. (optional, default `false`)
|
|
753
|
-
* `AccessLogFormat` **[String][60]?** A single line format of the access logs of
|
|
754
|
-
data, as specified by selected `$context` variables. The format must include at
|
|
755
|
-
least `$context.requestId`. [See AWS documentation for details][156].
|
|
756
|
-
* `WebhookSecret` **([String][60] | [Object][59])?** A secret string to be used to verify
|
|
757
|
-
payload signatures that are delivered to the endpoint. This is optional. If
|
|
758
|
-
not specified, a string will be generated for you. Implementation of
|
|
759
|
-
signature verification is up to the caller.
|
|
760
|
-
|
|
761
|
-
### Examples
|
|
762
|
-
|
|
763
|
-
```javascript
|
|
764
|
-
const cf = require('@mapbox/cloudfriend');
|
|
765
|
-
|
|
766
|
-
const myTemplate = {
|
|
767
|
-
...
|
|
768
|
-
Resources: {
|
|
769
|
-
MyLambdaFunction: {
|
|
770
|
-
Type: 'AWS::Lambda::Function',
|
|
771
|
-
Properties: { ... }
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
const webhook = new cf.shortcuts.hookshot.Passthrough({
|
|
777
|
-
Prefix: 'Webhook',
|
|
778
|
-
PassthroughTo: 'MyLambdaFunction'
|
|
779
|
-
});
|
|
780
|
-
|
|
781
|
-
module.exports = cf.merge(myTemplate, webhook);
|
|
782
|
-
```
|
|
783
|
-
|
|
784
|
-
## hookshot.Github
|
|
785
|
-
|
|
786
|
-
The hookshot.Github class defines resources that set up a single API Gateway
|
|
787
|
-
endpoint that is designed responds to POST requests sent from GitHub in
|
|
788
|
-
response to various GitHub events. The hookshot system will use a shared
|
|
789
|
-
secret to validate that the incoming payload did in fact originate from GitHub,
|
|
790
|
-
before sending the event payload to your Lambda function for further
|
|
791
|
-
processing. Any requests that did not come from GitHub or were not properly
|
|
792
|
-
signed using your secret key are rejected, and will never make it to your
|
|
793
|
-
Lambda function.
|
|
794
|
-
|
|
795
|
-
### Parameters
|
|
796
|
-
|
|
797
|
-
* `Prefix` **[String][60]** this will be used to prefix the set of CloudFormation
|
|
798
|
-
resources created by this shortcut.
|
|
799
|
-
* `PassthroughTo` **[String][60]** the logical name of the Lambda function that you
|
|
800
|
-
have written which will receive a request and generate a response to provide
|
|
801
|
-
to the caller.
|
|
802
|
-
* `LoggingLevel` **[String][60]** one of `OFF`, `INFO`, or `ERROR`. Logs are delivered
|
|
803
|
-
to a CloudWatch LogGroup named `API-Gateway-Execution-Logs_{rest-api-id}/hookshot`
|
|
804
|
-
* `WebhookSecret` **([String][60] | [Object][59])?** A secret string to be used to verify
|
|
805
|
-
payload signatures that are delivered to the endpoint. This is optional. If
|
|
806
|
-
not specified, a string will be generated for you. You should provide this
|
|
807
|
-
value to GitHub, and signature verification will be performed before your
|
|
808
|
-
Lambda function being invoked to respond to the event.
|
|
809
|
-
|
|
810
|
-
### Properties
|
|
811
|
-
|
|
812
|
-
* `Resources` **[Object][59]** the CloudFormation resources created by this shortcut.
|
|
813
|
-
* `Outputs` **[Object][59]** the CloudFormation outputs created by this
|
|
814
|
-
shortcut. This includes the URL for the API Gateway endpoint, and a secret
|
|
815
|
-
string. Use these two values to configure GitHub to send webhooks to your
|
|
816
|
-
API Gateway endpoint.
|
|
817
|
-
|
|
818
|
-
### Examples
|
|
819
|
-
|
|
820
|
-
```javascript
|
|
821
|
-
const cf = require('@mapbox/cloudfriend');
|
|
822
|
-
|
|
823
|
-
const myTemplate = {
|
|
824
|
-
...
|
|
825
|
-
Resources: {
|
|
826
|
-
MyLambdaFunction: {
|
|
827
|
-
Type: 'AWS::Lambda::Function',
|
|
828
|
-
Properties: { ... }
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
|
|
833
|
-
const webhook = new cf.shortcuts.hookshot.Github({
|
|
834
|
-
Prefix: 'Webhook',
|
|
835
|
-
PassthroughTo: 'MyLambdaFunction'
|
|
836
|
-
});
|
|
837
|
-
|
|
838
|
-
module.exports = cf.merge(myTemplate, webhook);
|
|
839
|
-
```
|
|
840
|
-
|
|
841
|
-
## LogSubscriptionLambda
|
|
842
|
-
|
|
843
|
-
**Extends Lambda**
|
|
844
|
-
|
|
845
|
-
A Lambda function that runs in response to a log subscription filter.
|
|
846
|
-
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
|
|
847
|
-
and a Lambda permission.
|
|
848
|
-
|
|
849
|
-
### Parameters
|
|
850
|
-
|
|
851
|
-
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
|
|
852
|
-
|
|
853
|
-
* `options.LogGroupName` **[String][60]** See [AWS documentation][157].
|
|
854
|
-
* `options.FilterPattern` **[String][60]** See [AWS documentation][158]. (optional, default `''`)
|
|
855
|
-
|
|
856
|
-
### Examples
|
|
857
|
-
|
|
858
|
-
```javascript
|
|
859
|
-
const cf = require('@mapbox/cloudfriend');
|
|
860
|
-
|
|
861
|
-
const myTemplate = { ... };
|
|
862
|
-
|
|
863
|
-
const lambda = new cf.shortcuts.LogSubscriptionLambda({
|
|
758
|
+
const lambda = new cf.shortcuts.StreamLambda({
|
|
864
759
|
LogicalName: 'MyLambda',
|
|
865
760
|
Code: {
|
|
866
761
|
S3Bucket: 'my-code-bucket',
|
|
867
762
|
S3Key: 'path/to/code.zip'
|
|
868
763
|
},
|
|
869
|
-
|
|
764
|
+
EventSourceArn: cf.getAtt('MyStream', 'Arn')
|
|
870
765
|
});
|
|
871
766
|
|
|
872
767
|
module.exports = cf.merge(myTemplate, lambda);
|
|
873
768
|
```
|
|
874
|
-
|
|
875
|
-
[1]: #lambda
|
|
876
|
-
|
|
877
|
-
[2]: #parameters
|
|
878
|
-
|
|
879
|
-
[3]: #examples
|
|
880
|
-
|
|
881
|
-
[4]: #scheduledlambda
|
|
882
|
-
|
|
883
|
-
[5]: #parameters-1
|
|
884
|
-
|
|
885
|
-
[6]: #examples-1
|
|
886
|
-
|
|
887
|
-
[7]: #eventlambda
|
|
888
|
-
|
|
889
|
-
[8]: #parameters-2
|
|
890
|
-
|
|
891
|
-
[9]: #examples-2
|
|
892
|
-
|
|
893
|
-
[10]: #queuelambda
|
|
894
|
-
|
|
895
|
-
[11]: #parameters-3
|
|
896
|
-
|
|
897
|
-
[12]: #examples-3
|
|
898
|
-
|
|
899
|
-
[13]: #streamlambda
|
|
900
|
-
|
|
901
|
-
[14]: #parameters-4
|
|
902
|
-
|
|
903
|
-
[15]: #examples-4
|
|
904
|
-
|
|
905
|
-
[16]: #role
|
|
906
|
-
|
|
907
|
-
[17]: #parameters-5
|
|
908
|
-
|
|
909
|
-
[18]: #examples-5
|
|
910
|
-
|
|
911
|
-
[19]: #crossaccountrole
|
|
912
|
-
|
|
913
|
-
[20]: #parameters-6
|
|
914
|
-
|
|
915
|
-
[21]: #examples-6
|
|
916
|
-
|
|
917
|
-
[22]: #servicerole
|
|
918
|
-
|
|
919
|
-
[23]: #parameters-7
|
|
920
|
-
|
|
921
|
-
[24]: #examples-7
|
|
922
|
-
|
|
923
|
-
[25]: #queue
|
|
924
|
-
|
|
925
|
-
[26]: #parameters-8
|
|
926
|
-
|
|
927
|
-
[27]: #examples-8
|
|
928
|
-
|
|
929
|
-
[28]: #s3kinesisfirehose
|
|
930
|
-
|
|
931
|
-
[29]: #parameters-9
|
|
932
|
-
|
|
933
|
-
[30]: #examples-9
|
|
934
|
-
|
|
935
|
-
[31]: #kinesisfirehosebase
|
|
936
|
-
|
|
937
|
-
[32]: #parameters-10
|
|
938
|
-
|
|
939
|
-
[33]: #gluedatabase
|
|
940
|
-
|
|
941
|
-
[34]: #parameters-11
|
|
942
|
-
|
|
943
|
-
[35]: #examples-10
|
|
944
|
-
|
|
945
|
-
[36]: #gluetable
|
|
946
|
-
|
|
947
|
-
[37]: #parameters-12
|
|
948
|
-
|
|
949
|
-
[38]: #examples-11
|
|
950
|
-
|
|
951
|
-
[39]: #gluejsontable
|
|
952
|
-
|
|
953
|
-
[40]: #parameters-13
|
|
954
|
-
|
|
955
|
-
[41]: #glueorctable
|
|
956
|
-
|
|
957
|
-
[42]: #parameters-14
|
|
958
|
-
|
|
959
|
-
[43]: #glueparquettable
|
|
960
|
-
|
|
961
|
-
[44]: #parameters-15
|
|
962
|
-
|
|
963
|
-
[45]: #glueprestoview
|
|
964
|
-
|
|
965
|
-
[46]: #parameters-16
|
|
966
|
-
|
|
967
|
-
[47]: #gluesparkview
|
|
968
|
-
|
|
969
|
-
[48]: #parameters-17
|
|
970
|
-
|
|
971
|
-
[49]: #hookshotpassthrough
|
|
972
|
-
|
|
973
|
-
[50]: #parameters-18
|
|
974
|
-
|
|
975
|
-
[51]: #examples-12
|
|
976
|
-
|
|
977
|
-
[52]: #hookshotgithub
|
|
978
|
-
|
|
979
|
-
[53]: #parameters-19
|
|
980
|
-
|
|
981
|
-
[54]: #properties
|
|
982
|
-
|
|
983
|
-
[55]: #examples-13
|
|
984
|
-
|
|
985
|
-
[56]: #logsubscriptionlambda
|
|
986
|
-
|
|
987
|
-
[57]: #parameters-20
|
|
988
|
-
|
|
989
|
-
[58]: #examples-14
|
|
990
|
-
|
|
991
|
-
[59]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
992
|
-
|
|
993
|
-
[60]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
994
|
-
|
|
995
|
-
[61]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html
|
|
996
|
-
|
|
997
|
-
[62]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
|
|
998
|
-
|
|
999
|
-
[63]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description
|
|
1000
|
-
|
|
1001
|
-
[64]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment
|
|
1002
|
-
|
|
1003
|
-
[65]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname
|
|
1004
|
-
|
|
1005
|
-
[66]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler
|
|
1006
|
-
|
|
1007
|
-
[67]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn
|
|
1008
|
-
|
|
1009
|
-
[68]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1010
|
-
|
|
1011
|
-
[69]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers
|
|
1012
|
-
|
|
1013
|
-
[70]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
1014
|
-
|
|
1015
|
-
[71]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize
|
|
1016
|
-
|
|
1017
|
-
[72]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-reservedconcurrentexecutions
|
|
1018
|
-
|
|
1019
|
-
[73]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime
|
|
1020
|
-
|
|
1021
|
-
[74]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags
|
|
1022
|
-
|
|
1023
|
-
[75]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout
|
|
1024
|
-
|
|
1025
|
-
[76]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig
|
|
1026
|
-
|
|
1027
|
-
[77]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig
|
|
1028
|
-
|
|
1029
|
-
[78]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html
|
|
1030
|
-
|
|
1031
|
-
[79]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
|
|
1032
|
-
|
|
1033
|
-
[80]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname
|
|
1034
|
-
|
|
1035
|
-
[81]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription
|
|
1036
|
-
|
|
1037
|
-
[82]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions
|
|
1038
|
-
|
|
1039
|
-
[83]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-period
|
|
1040
|
-
|
|
1041
|
-
[84]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluationperiods
|
|
1042
|
-
|
|
1043
|
-
[85]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic
|
|
1044
|
-
|
|
1045
|
-
[86]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarm-datapointstoalarm
|
|
1046
|
-
|
|
1047
|
-
[87]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold
|
|
1048
|
-
|
|
1049
|
-
[88]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator
|
|
1050
|
-
|
|
1051
|
-
[89]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata
|
|
1052
|
-
|
|
1053
|
-
[90]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluatelowsamplecountpercentile
|
|
1054
|
-
|
|
1055
|
-
[91]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-extendedstatistic
|
|
1056
|
-
|
|
1057
|
-
[92]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions
|
|
1058
|
-
|
|
1059
|
-
[93]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression
|
|
1060
|
-
|
|
1061
|
-
[94]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state
|
|
1062
|
-
|
|
1063
|
-
[95]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern
|
|
1064
|
-
|
|
1065
|
-
[96]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn
|
|
1066
|
-
|
|
1067
|
-
[97]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize
|
|
1068
|
-
|
|
1069
|
-
[98]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds
|
|
1070
|
-
|
|
1071
|
-
[99]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
1072
|
-
|
|
1073
|
-
[100]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled
|
|
1074
|
-
|
|
1075
|
-
[101]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition
|
|
1076
|
-
|
|
1077
|
-
[102]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
|
|
1078
|
-
|
|
1079
|
-
[103]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html?shortFooter=true#cfn-iam-role-assumerolepolicydocument
|
|
1080
|
-
|
|
1081
|
-
[104]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html#cfn-iam-policies-policydocument
|
|
1082
|
-
|
|
1083
|
-
[105]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-managepolicyarns
|
|
1084
|
-
|
|
1085
|
-
[106]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-maxsessionduration
|
|
1086
|
-
|
|
1087
|
-
[107]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-path
|
|
1088
|
-
|
|
1089
|
-
[108]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-rolename
|
|
1090
|
-
|
|
1091
|
-
[109]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-tags
|
|
1092
|
-
|
|
1093
|
-
[110]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout
|
|
1094
|
-
|
|
1095
|
-
[111]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues-redrivepolicy.html#aws-sqs-queue-redrivepolicy-maxcount
|
|
1096
|
-
|
|
1097
|
-
[112]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-contentbaseddeduplication
|
|
1098
|
-
|
|
1099
|
-
[113]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-delayseconds
|
|
1100
|
-
|
|
1101
|
-
[114]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-fifoqueue
|
|
1102
|
-
|
|
1103
|
-
[115]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsmasterkeyid
|
|
1104
|
-
|
|
1105
|
-
[116]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsdatakeyreuseperiodseconds
|
|
1106
|
-
|
|
1107
|
-
[117]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-maxmsgsize
|
|
1108
|
-
|
|
1109
|
-
[118]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod
|
|
1110
|
-
|
|
1111
|
-
[119]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-name
|
|
1112
|
-
|
|
1113
|
-
[120]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-receivemsgwaittime
|
|
1114
|
-
|
|
1115
|
-
[121]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-name
|
|
1116
|
-
|
|
1117
|
-
[122]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-displayname
|
|
1118
|
-
|
|
1119
|
-
[123]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-intervalinseconds
|
|
1120
|
-
|
|
1121
|
-
[124]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-sizeinmbs
|
|
1122
|
-
|
|
1123
|
-
[125]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-name
|
|
1124
|
-
|
|
1125
|
-
[126]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-database.html#cfn-glue-database-catalogid
|
|
1126
|
-
|
|
1127
|
-
[127]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description
|
|
1128
|
-
|
|
1129
|
-
[128]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-locationuri
|
|
1130
|
-
|
|
1131
|
-
[129]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-parameters
|
|
1132
|
-
|
|
1133
|
-
[130]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-name
|
|
1134
|
-
|
|
1135
|
-
[131]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-databasename
|
|
1136
|
-
|
|
1137
|
-
[132]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-columns
|
|
1138
|
-
|
|
1139
|
-
[133]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-catalogid
|
|
1140
|
-
|
|
1141
|
-
[134]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-owner
|
|
1142
|
-
|
|
1143
|
-
[135]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters
|
|
1144
|
-
|
|
1145
|
-
[136]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-partitionkeys
|
|
1146
|
-
|
|
1147
|
-
[137]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-description
|
|
1148
|
-
|
|
1149
|
-
[138]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-retention
|
|
1150
|
-
|
|
1151
|
-
[139]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-tabletype
|
|
1152
|
-
|
|
1153
|
-
[140]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-viewexpandedtext
|
|
1154
|
-
|
|
1155
|
-
[141]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-vieworiginaltext
|
|
1156
|
-
|
|
1157
|
-
[142]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-bucketcolumns
|
|
1158
|
-
|
|
1159
|
-
[143]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-compressed
|
|
1160
|
-
|
|
1161
|
-
[144]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-inputformat
|
|
1162
|
-
|
|
1163
|
-
[145]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location
|
|
1164
|
-
|
|
1165
|
-
[146]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-numberofbuckets
|
|
1166
|
-
|
|
1167
|
-
[147]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-outputformat
|
|
1168
|
-
|
|
1169
|
-
[148]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-parameters
|
|
1170
|
-
|
|
1171
|
-
[149]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-serdeinfo
|
|
1172
|
-
|
|
1173
|
-
[150]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-skewedinfo
|
|
1174
|
-
|
|
1175
|
-
[151]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-sortcolumns
|
|
1176
|
-
|
|
1177
|
-
[152]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-storedasdubdirectories
|
|
1178
|
-
|
|
1179
|
-
[153]: https://github.com/mapbox/cloudfriend/blob/master/lib/shortcuts/glue-table.js
|
|
1180
|
-
|
|
1181
|
-
[154]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
|
|
1182
|
-
|
|
1183
|
-
[155]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format
|
|
1184
|
-
|
|
1185
|
-
[156]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-stage-accesslogsetting.html#cfn-apigateway-stage-accesslogsetting-format
|
|
1186
|
-
|
|
1187
|
-
[157]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-loggroupname
|
|
1188
|
-
|
|
1189
|
-
[158]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern
|