Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mapbox/cloudfriend

Package Overview
Dependencies
Maintainers
14
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/cloudfriend - npm Package Compare versions

Comparing version 6.0.0-SNAPSHOT-1 to 6.0.0

.nyc_output/ef96ce8d-21af-4efa-8fde-041438a648a6.json

2

.nyc_output/processinfo/index.json

@@ -1,1 +0,1 @@

{"processes":{"520655c5-a674-40fe-935c-4cace7e4719f":{"parent":"cfc820e0-b613-4675-b027-ca1a7c3c3d64","children":[]},"cfc820e0-b613-4675-b027-ca1a7c3c3d64":{"parent":null,"children":["520655c5-a674-40fe-935c-4cace7e4719f"]}},"files":{"/Users/bilindhajer/cloudfriend/bin/build-template.js":["520655c5-a674-40fe-935c-4cace7e4719f"],"/Users/bilindhajer/cloudfriend/index.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/intrinsic.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/conditions.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/rules.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/pseudo.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/build.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/validate.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/merge.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/index.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/service-role.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/role.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/scheduled-lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/event-lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue-lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/stream-lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/cross-account-role.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/kinesis-firehose-base.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-database.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-table.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-json-table.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-orc-table.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-parquet-table.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-presto-view.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-spark-view.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/hookshot.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/log-subscription-lambda.js":["520655c5-a674-40fe-935c-4cace7e4719f","cfc820e0-b613-4675-b027-ca1a7c3c3d64"]},"externalIds":{}}
{"processes":{"ef96ce8d-21af-4efa-8fde-041438a648a6":{"parent":null,"children":["efe82251-5e4c-42c5-9ae2-a01d0358ec20"]},"efe82251-5e4c-42c5-9ae2-a01d0358ec20":{"parent":"ef96ce8d-21af-4efa-8fde-041438a648a6","children":[]}},"files":{"/Users/bilindhajer/cloudfriend/index.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/intrinsic.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/conditions.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/rules.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/pseudo.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/build.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/validate.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/merge.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/index.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/service-role.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/role.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/scheduled-lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/event-lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue-lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/stream-lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/cross-account-role.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/kinesis-firehose-base.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-database.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-table.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-json-table.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-orc-table.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-parquet-table.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-presto-view.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-spark-view.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/hookshot.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/log-subscription-lambda.js":["ef96ce8d-21af-4efa-8fde-041438a648a6","efe82251-5e4c-42c5-9ae2-a01d0358ec20"],"/Users/bilindhajer/cloudfriend/bin/build-template.js":["efe82251-5e4c-42c5-9ae2-a01d0358ec20"]},"externalIds":{}}
# Changelog
## v6.0.0
- Updates default node runtime for lambda shortcuts to node16.x.
- Updates default authorization type for hookshot shortcuts to "NONE" from "None".
## v5.1.1

@@ -4,0 +9,0 @@

@@ -1,115 +0,111 @@

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## Classes
### Table of Contents
<dl>
<dt><a href="#CrossAccountRole">CrossAccountRole</a></dt>
<dd><p>Create an IAM role that will be assumed from another AWS Account.</p>
</dd>
<dt><a href="#EventLambda">EventLambda</a></dt>
<dd><p>A Lambda function that runs in reaction to a CloudWatch Event. Includes
a LogGroup, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
a Lambda permission.</p>
</dd>
<dt><a href="#GlueDatabase">GlueDatabase</a></dt>
<dd><p>Create a Glue Database.</p>
</dd>
<dt><a href="#GlueJsonTable">GlueJsonTable</a></dt>
<dd><p>Create a Glue Table backed by line-delimited JSON files on S3.</p>
</dd>
<dt><a href="#GlueOrcTable">GlueOrcTable</a></dt>
<dd><p>Create a Glue Table backed by ORC files on S3.</p>
</dd>
<dt><a href="#GlueParquetTable">GlueParquetTable</a></dt>
<dd><p>Create a Glue table backed by Parquet files on S3.</p>
</dd>
<dt><a href="#GluePrestoView">GluePrestoView</a></dt>
<dd><p>Create a Glue Presto View.</p>
</dd>
<dt><a href="#GlueSparkView">GlueSparkView</a></dt>
<dd><p>Create a Glue Presto View.</p>
</dd>
<dt><a href="#GlueTable">GlueTable</a></dt>
<dd><p>Create a Glue Table.</p>
<p>Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:</p>
<ul>
<li><a href="#gluejsontable">GlueJsonTable</a></li>
<li><a href="#glueorctable">GlueOrcTable</a></li>
</ul>
</dd>
<dt><a href="#KinesisFirehoseBase">KinesisFirehoseBase</a></dt>
<dd><p>Base class for creating a Kinesis Firehouse that can receive records
by direct put or by consuming a Kinesis Stream.
Each implementing subclass enables writing to a specific destination.
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
a policy allowing records to be delivered to the delivery stream.</p>
</dd>
<dt><a href="#Lambda">Lambda</a></dt>
<dd><p>Baseline CloudFormation resources involved in a Lambda Function. Creates a
Log Group, a Role, an Alarm on function errors, and the Lambda Function itself.</p>
</dd>
<dt><a href="#LogSubscriptionLambda">LogSubscriptionLambda</a></dt>
<dd><p>A Lambda function that runs in response to a log subscription filter.
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
and a Lambda permission.</p>
</dd>
<dt><a href="#QueueLambda">QueueLambda</a></dt>
<dd><p>A Lambda function that runs in response to messages in an SQS queue.
Includes a Log Group, a Role, an Alarm on function errors, and an event source
mapping.</p>
</dd>
<dt><a href="#Queue">Queue</a></dt>
<dd><p>Creates an SQS queue with an attached dead-letter queue.</p>
<p>Standard (non-FIFO) queues can receive messages through an SNS topic. The
shortcut either creates a new SNS topic that can be used for sending messages
into the queue, or subscribes the queue to an existing SNS topic provided
with the <code>ExistingTopicArn</code> option. For FIFO queues, no SNS topic is created
and <code>ExistingTopicArn</code> is ignored.</p>
</dd>
<dt><a href="#Role">Role</a></dt>
<dd><p>Create an IAM role.</p>
</dd>
<dt><a href="#S3KinesisFirehose">S3KinesisFirehose</a></dt>
<dd><p>Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
Also creates a CloudWatch alarm on the <code>DeliveryToS3.DataFreshness</code> metric -- the age
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
By default, if that metric exceeds double the <code>BufferingIntervalInSeconds</code>, the
alarm is triggered.</p>
</dd>
<dt><a href="#ScheduledLambda">ScheduledLambda</a></dt>
<dd><p>A Lambda function that runs on in response to a CloudWatch Event. Includes
a Log Group, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
a Lambda permission.</p>
</dd>
<dt><a href="#ServiceRole">ServiceRole</a></dt>
<dd><p>Create an IAM role that will be assumed by an AWS service, e.g. Lambda or ECS.</p>
</dd>
<dt><a href="#StreamLambda">StreamLambda</a></dt>
<dd><p>A Lambda function that runs in response to events in a DynamoDB or Kinesis
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
source mapping.</p>
</dd>
</dl>
* [Lambda][1]
* [Parameters][2]
* [Examples][3]
* [ScheduledLambda][4]
* [Parameters][5]
* [Examples][6]
* [EventLambda][7]
* [Parameters][8]
* [Examples][9]
* [QueueLambda][10]
* [Parameters][11]
* [Examples][12]
* [StreamLambda][13]
* [Parameters][14]
* [Examples][15]
* [Role][16]
* [Parameters][17]
* [Examples][18]
* [CrossAccountRole][19]
* [Parameters][20]
* [Examples][21]
* [ServiceRole][22]
* [Parameters][23]
* [Examples][24]
* [Queue][25]
* [Parameters][26]
* [Examples][27]
* [S3KinesisFirehose][28]
* [Parameters][29]
* [Examples][30]
* [KinesisFirehoseBase][31]
* [Parameters][32]
* [GlueDatabase][33]
* [Parameters][34]
* [Examples][35]
* [GlueTable][36]
* [Parameters][37]
* [Examples][38]
* [GlueJsonTable][39]
* [Parameters][40]
* [GlueOrcTable][41]
* [Parameters][42]
* [GlueParquetTable][43]
* [Parameters][44]
* [GluePrestoView][45]
* [Parameters][46]
* [GlueSparkView][47]
* [Parameters][48]
* [hookshot.Passthrough][49]
* [Parameters][50]
* [Examples][51]
* [hookshot.Github][52]
* [Parameters][53]
* [Properties][54]
* [Examples][55]
* [LogSubscriptionLambda][56]
* [Parameters][57]
* [Examples][58]
<a name="CrossAccountRole"></a>
## Lambda
## CrossAccountRole
Create an IAM role that will be assumed from another AWS Account.
Baseline CloudFormation resources involved in a Lambda Function. Creates a
Log Group, a Role, an Alarm on function errors, and the Lambda Function itself.
**Kind**: global class
<a name="new_CrossAccountRole_new"></a>
### Parameters
### new CrossAccountRole(options)
* `options` **[Object][59]** Options.
| Param | Type | Description |
| --- | --- | --- |
| 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: |
| options.Accounts | <code>Array.&lt;(String\|Object)&gt;</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')`). |
* `options.LogicalName` **[String][60]** 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.
* `options.Code` **[Object][59]** See [AWS documentation][61].
* `options.DeadLetterConfig` **[Object][59]** See [AWS documentation][62]. (optional, default `undefined`)
* `options.Description` **[String][60]** See [AWS documentation][63]. (optional, default `'${logical name} in the ${stack name} stack'`)
* `options.Environment` **[Object][59]** See [AWS documentation][64]. (optional, default `undefined`)
* `options.FunctionName` **[String][60]** See [AWS documentation][65]. (optional, default `'${stack name}-${logical name}'`)
* `options.Handler` **[String][60]** See [AWS documentation][66]. (optional, default `'index.handler'`)
* `options.KmsKeyArn` **[String][60]** See [AWS documentation][67]. (optional, default `undefined`)
* `options.Layers` **[Array][68]<[String][60]>** See [AWS documentation][69]. (optional, default `undefined`)
* `options.MemorySize` **[Number][70]** See [AWS documentation][71]. (optional, default `128`)
* `options.ReservedConcurrentExecutions` **[Number][70]** See [AWS documentation][72]. (optional, default `undefined`)
* `options.Runtime` **[String][60]** See [AWS documentation][73]. (optional, default `'nodejs16.x'`)
* `options.Tags` **[Array][68]<[Object][59]>** See [AWS documentation][74]. (optional, default `undefined`)
* `options.Timeout` **[Number][70]** See [AWS documentation][75]. (optional, default `300`)
* `options.TracingConfig` **[Object][59]** See [AWS documentation][76]. (optional, default `undefined`)
* `options.VpcConfig` **[Object][59]** See [AWS documentation][77]. (optional, default `undefined`)
* `options.Condition` **[String][60]** 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][78]. (optional, default `undefined`)
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
to this Lambda function. See [AWS documentation][79]. (optional, default `undefined`)
* `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 `[]`)
* `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`)
* `options.AlarmName` **[String][60]** See [AWS documentation][80]. (optional, default `'${stack name}-${logical name}-Errors-${region}'`)
* `options.AlarmDescription` **[String][60]** See [AWS documentation][81]. (optional, default `'Error alarm for ${stack name}-${logical name} lambda function in ${stack name} stack'`)
* `options.AlarmActions` **[Array][68]<[String][60]>** See [AWS documentation][82]. (optional, default `[]`)
* `options.Period` **[Number][70]** See [AWS documentation][83]. (optional, default `60`)
* `options.EvaluationPeriods` **[Number][70]** See [AWS documentation][84]. (optional, default `1`)
* `options.Statistic` **[String][60]** See [AWS documentation][85]. (optional, default `'Sum'`)
* `options.DatapointsToAlarm` **[Number][70]** See [AWS documentation][86]. (optional, default `1`)
* `options.Threshold` **[Number][70]** See [AWS documentation][87]. (optional, default `0`)
* `options.ComparisonOperator` **[String][60]** See [AWS documentation][88]. (optional, default `'GreaterThanThreshold'`)
* `options.TreatMissingData` **[String][60]** See [AWS documentation][89]. (optional, default `'notBreaching'`)
* `options.EvaluateLowSampleCountPercentile` **[String][60]** See [AWS documentation][90]. (optional, default `undefined`)
* `options.ExtendedStatistic` **[String][60]** See [AWS documentation][91]] (optional, default `undefined`)
* `options.OKActions` **[Array][68]<[String][60]>** See [AWS documentation][92]. (optional, default `undefined`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -119,51 +115,19 @@

const lambda = new cf.shortcuts.Lambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
}
const role = new cf.shortcuts.CrossAccountRole({
LogicalName: 'MyRole',
Accounts: ['123456789012'],
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
]
});
module.exports = cf.merge(myTemplate, lambda);
module.exports = cf.merge(myTemplate, role);
```
<a name="EventLambda"></a>
## ScheduledLambda
**Extends Lambda**
A Lambda function that runs on in response to a CloudWatch Event. Includes
a Log Group, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
a Lambda permission.
### Parameters
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
* `options.ScheduleExpression` **[String][60]** See [AWS documentation][93].
* `options.State` **[String][60]** See [AWS documentation][94]. (optional, default `'ENABLED'`)
### Examples
```javascript
const cf = require('@mapbox/cloudfriend');
const myTemplate = { ... };
const lambda = new cf.shortcuts.ScheduledLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
ScheduleExpression: 'cron(45 * * * ? *)',
});
module.exports = cf.merge(myTemplate, lambda);
```
## EventLambda
**Extends Lambda**
A Lambda function that runs in reaction to a CloudWatch Event. Includes

@@ -173,13 +137,15 @@ a LogGroup, a Role, an Alarm on function errors, a CloudWatch Event Rule, and

### Parameters
**Kind**: global class
<a name="new_EventLambda_new"></a>
* `options` **[Object][59]** Extends the options for [`Lambda`][1]
with the following additional attributes:
### new EventLambda(options)
* `options.EventPattern` **[String][60]** See [AWS documentation][95].
* `options.State` **[String][60]** See [AWS documentation][94]. (optional, default `'ENABLED'`)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
| 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). |
| [options.State] | <code>String</code> | <code>&#x27;ENABLED&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state). |
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -206,22 +172,26 @@

```
<a name="GlueDatabase"></a>
## QueueLambda
## GlueDatabase
Create a Glue Database.
**Extends Lambda**
**Kind**: global class
<a name="new_GlueDatabase_new"></a>
A Lambda function that runs in response to messages in an SQS queue.
Includes a Log Group, a Role, an Alarm on function errors, and an event source
mapping.
### new GlueDatabase(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| options.LogicalName | <code>String</code> | | The logical name of the Glue Database within the CloudFormation template. |
| 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). |
| [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). |
| [options.Description] | <code>String</code> | <code>&#x27;Created by the ${AWS::StackName} CloudFormation stack&#x27;</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). |
| [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). |
| [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). |
| [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). |
| [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). |
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
* `options.EventSourceArn` **[String][60]** See [AWS documentation][96].
* `options.ReservedConcurrentExecutions` **[Number][70]** See [AWS documentation][72].
* `options.BatchSize` **[Number][70]** See [AWS documentation][97]. (optional, default `1`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -231,123 +201,147 @@

const lambda = new cf.shortcuts.QueueLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
EventSourceArn: cf.getAtt('MyQueue', 'Arn'),
ReservedConcurrentExecutions: 30
const db = new cf.shortcuts.GlueDatabase({
LogicalName: 'MyDatabase',
Name: 'my_database'
});
module.exports = cf.merge(myTemplate, lambda);
module.exports = cf.merge(myTemplate, db);
```
<a name="GlueJsonTable"></a>
## StreamLambda
## GlueJsonTable
Create a Glue Table backed by line-delimited JSON files on S3.
**Extends Lambda**
**Kind**: global class
<a name="new_GlueJsonTable_new"></a>
A Lambda function that runs in response to events in a DynamoDB or Kinesis
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
source mapping.
### new GlueJsonTable(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
| 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). |
| [options.TableType] | <code>String</code> | <code>&#x27;EXTERNAL_TABLE&#x27;</code> | Hard-wired by this shortcut. |
| [options.InputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.mapred.TextInputFormat&#x27;</code> | Hard-wired by this shortcut. |
| [options.OutputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat&#x27;</code> | Hard-wired by this shortcut. |
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
| [options.SerdeInfo.SerializationLibrary] | <code>Object</code> | <code>&#x27;org.openx.data.jsonserde.JsonSerDe&#x27;</code> | Hard-wired by this shortcut. |
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
<a name="GlueOrcTable"></a>
* `options.EventSourceArn` **[String][60]** See [AWS documentation][96].
* `options.BatchSize` **[Number][70]** See [AWS documentation][97]. (optional, default `1`)
* `options.MaximumBatchingWindowInSeconds` **[Number][70]** See [AWS documentation][98]. (optional, default `undefined`)
* `options.Enabled` **[Boolean][99]** See [AWS documentation][100]. (optional, default `true`)
* `options.StartingPosition` **[String][60]** See [AWS documentation][101]. (optional, default `'LATEST'`)
## GlueOrcTable
Create a Glue Table backed by ORC files on S3.
### Examples
**Kind**: global class
<a name="new_GlueOrcTable_new"></a>
```javascript
const cf = require('@mapbox/cloudfriend');
### new GlueOrcTable(options)
const myTemplate = { ... };
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
| 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). |
| [options.TableType] | <code>String</code> | <code>&#x27;EXTERNAL_TABLE&#x27;</code> | Hard-wired by this shortcut. |
| [options.InputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.orc.OrcInputFormat&#x27;</code> | Hard-wired by this shortcut. |
| [options.OutputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat&#x27;</code> | Hard-wired by this shortcut. |
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
| [options.SerdeInfo.SerializationLibrary] | <code>Object</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.orc.OrcSerde&#x27;</code> | Hard-wired by this shortcut. |
const lambda = new cf.shortcuts.StreamLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
EventSourceArn: cf.getAtt('MyStream', 'Arn')
});
<a name="GlueParquetTable"></a>
module.exports = cf.merge(myTemplate, lambda);
```
## GlueParquetTable
Create a Glue table backed by Parquet files on S3.
## Role
**Kind**: global class
<a name="new_GlueParquetTable_new"></a>
Create an IAM role.
### new GlueParquetTable(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| 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: |
| 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). |
| [options.TableType] | <code>String</code> | <code>&#x27;EXTERNAL_TABLE&#x27;</code> | Hard-wired by this shortcut. |
| [options.InputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat&#x27;</code> | - Hard-wired by this shortcut. |
| [options.OutputFormat] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat&#x27;</code> | - Hard-wired by this shortcut. |
| [options.SerdeInfo] | <code>Object</code> | | Hard-wired by this shortcut. |
| [options.SerdeInfo.SerializationLibrary] | <code>String</code> | <code>&#x27;org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe&#x27;</code> | - Hard-wired by this shortcut. |
* `options` **[Object][59]** Options.
<a name="GluePrestoView"></a>
* `options.LogicalName` **[String][60]** The logical name of the IAM role
within the CloudFormation template.
* `options.AssumeRolePrincipals` **[Array][68]<[Object][59]>** An array of [principal objects][102]
defining entities able to assume this role. Will be included in the role's
[`AssumeRolePolicyDocument`][103].
* `options.Statement` **[Array][68]<[Object][59]>** An array of permissions statements
to be included in the [`PolicyDocument`][104]. (optional, default `[]`)
* `options.ManagedPolicyArns` **[Array][68]<[String][60]>** See [AWS documentation][105]. (optional, default `undefined`)
* `options.MaxSessionDuration` **[Number][70]** See [AWS documentation][106]. (optional, default `undefined`)
* `options.Path` **[String][60]** See [AWS documentation][107]. (optional, default `undefined`)
* `options.RoleName` **[String][60]** See [AWS documentation][108]. (optional, default `undefined`)
* `options.Tags` **[Array][68]<[Object][59]>** See [AWS documentation][109]. (optional, default `undefined`)
* `options.Condition` **[String][60]** -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][78]. (optional, default `undefined`)
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
to this IAM role. See [AWS documentation][79]. (optional, default `undefined`)
## GluePrestoView
Create a Glue Presto View.
### Examples
**Kind**: global class
<a name="new_GluePrestoView_new"></a>
```javascript
const cf = require('@mapbox/cloudfriend');
### new GluePrestoView(options)
const myTemplate = { ... };
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
| options.OriginalSql | <code>String</code> | | The SQL query that defines the view. |
| [options.TableType] | <code>String</code> | <code>&#x27;VIRTUAL_VIEW&#x27;</code> | Hard-wired by this shortcut. |
const role = new cf.shortcuts.Role({
LogicalName: 'MyRole',
AssumeRolePrincipals: [
{ Service: 'ec2.amazonaws.com' }
],
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
]
});
<a name="GlueSparkView"></a>
module.exports = cf.merge(myTemplate, role);
```
## GlueSparkView
Create a Glue Presto View.
## CrossAccountRole
**Kind**: global class
<a name="new_GlueSparkView_new"></a>
**Extends Role**
### new GlueSparkView(options)
Create an IAM role that will be assumed from another AWS Account.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Accepts the same options as [`GlueTable`](#gluetable), though the following additional attributes are either required or hard-wired: |
| options.OriginalSql | <code>String</code> | | The SQL query that defines the view. |
| [options.TableType] | <code>String</code> | <code>&#x27;VIRTUAL_VIEW&#x27;</code> | Hard-wired by this shortcut. |
### Parameters
<a name="GlueTable"></a>
* `options` **[Object][59]** Extends
the options for [`Role`][16]. You do not need to provide
an `AssumeRolePrincipals` attribute, but do need to include the following
additional attributes:
## GlueTable
Create a Glue Table.
* `options.Accounts` **[Array][68]<([String][60] | [Object][59])>** 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')`).
Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:
- [GlueJsonTable](#gluejsontable)
- [GlueOrcTable](#glueorctable)
### Examples
**Kind**: global class
<a name="new_GlueTable_new"></a>
```javascript
### new GlueTable(options)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| options.LogicalName | <code>String</code> | | The logical name of the Glue Table within the CloudFormation template. |
| 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). |
| 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). |
| options.Columns | <code>Array.&lt;Object&gt;</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). |
| [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). |
| [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). |
| [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). |
| [options.PartitionKeys] | <code>Array.&lt;String&gt;</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). |
| [options.Description] | <code>String</code> | <code>&#x27;Created by the ${AWS::StackName} CloudFormation stack&#x27;</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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [options.BucketColumns] | <code>Array.&lt;String&gt;</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). |
| [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). |
| [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). |
| [options.Location] | <code>String</code> | <code>&#x27;&#x27;</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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [options.SortColumns] | <code>Array.&lt;Object&gt;</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). |
| [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). |
| [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). |
| [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). |
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -357,35 +351,83 @@

const role = new cf.shortcuts.CrossAccountRole({
LogicalName: 'MyRole',
Accounts: ['123456789012'],
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
const table = new cf.shortcuts.GlueTable({
LogicalName: 'MyTable',
DatabaseName: 'my_database',
Name: 'my_table',
Columns: [
{ Name: 'column_name', Type: 'string', Comment: 'my_column description' }
]
});
module.exports = cf.merge(myTemplate, role);
module.exports = cf.merge(myTemplate, table);
```
<a name="KinesisFirehoseBase"></a>
## ServiceRole
## KinesisFirehoseBase
Base class for creating a Kinesis Firehouse that can receive records
by direct put or by consuming a Kinesis Stream.
Each implementing subclass enables writing to a specific destination.
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
a policy allowing records to be delivered to the delivery stream.
**Extends Role**
**Kind**: global class
<a name="new_KinesisFirehoseBase_new"></a>
Create an IAM role that will be assumed by an AWS service, e.g. Lambda or ECS.
### new KinesisFirehoseBase(options)
### Parameters
| Param | Type | Description |
| --- | --- | --- |
| options | <code>Object</code> | Options. |
| 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. |
| [options.KinesisStreamARN] | <code>String</code> \| <code>Object</code> | The ARN of a source Kinesis Stream. |
* `options` **[Object][59]** Extends
the options for [`Role`][16]. You do not need to provide
an `AssumeRolePrincipals` attribute, but do need to include the following
additional attributes:
<a name="Lambda"></a>
* `options.Service` **[String][60]** The name of the AWS service that will assume this role, e.g. `lambda`.
## Lambda
Baseline CloudFormation resources involved in a Lambda Function. Creates a
Log Group, a Role, an Alarm on function errors, and the Lambda Function itself.
### Examples
**Kind**: global class
<a name="new_Lambda_new"></a>
```javascript
### new Lambda(options)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| 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. |
| options.Code | <code>Object</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html). |
| [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). |
| [options.Description] | <code>String</code> | <code>&#x27;${logical name} in the ${stack name} stack&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description). |
| [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). |
| [options.FunctionName] | <code>String</code> | <code>&#x27;${stack name}-${logical name}&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname). |
| [options.Handler] | <code>String</code> | <code>&#x27;index.handler&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler). |
| [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). |
| [options.Layers] | <code>Array.&lt;String&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers). |
| [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). |
| [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). |
| [options.Runtime] | <code>String</code> | <code>&#x27;nodejs16.x&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime). |
| [options.Tags] | <code>Array.&lt;Object&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [options.Statement] | <code>Array.&lt;Object&gt;</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._ |
| [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._ |
| [options.AlarmName] | <code>String</code> | <code>&#x27;${stack name}-${logical name}-Errors-${region}&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname). |
| [options.AlarmDescription] | <code>String</code> | <code>&#x27;Error alarm for ${stack name}-${logical name} lambda function in ${stack name} stack&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription). |
| [options.AlarmActions] | <code>Array.&lt;String&gt;</code> | <code>[]</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions). |
| [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). |
| [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). |
| [options.Statistic] | <code>String</code> | <code>&#x27;Sum&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic). |
| [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). |
| [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). |
| [options.ComparisonOperator] | <code>String</code> | <code>&#x27;GreaterThanThreshold&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator). |
| [options.TreatMissingData] | <code>String</code> | <code>&#x27;notBreaching&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata). |
| [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). |
| [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)] |
| [options.OKActions] | <code>Array.&lt;String&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions). |
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -395,62 +437,32 @@

const role = new cf.shortcuts.ServiceRole({
LogicalName: 'MyRole',
Service: 'lambda',
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
]
const lambda = new cf.shortcuts.Lambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
}
});
module.exports = cf.merge(myTemplate, role);
module.exports = cf.merge(myTemplate, lambda);
```
<a name="LogSubscriptionLambda"></a>
## Queue
## LogSubscriptionLambda
A Lambda function that runs in response to a log subscription filter.
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
and a Lambda permission.
Creates an SQS queue with an attached dead-letter queue.
**Kind**: global class
<a name="new_LogSubscriptionLambda_new"></a>
Standard (non-FIFO) queues can receive messages through an SNS topic. The
shortcut either creates a new SNS topic that can be used for sending messages
into the queue, or subscribes the queue to an existing SNS topic provided
with the `ExistingTopicArn` option. For FIFO queues, no SNS topic is created
and `ExistingTopicArn` is ignored.
### new LogSubscriptionLambda(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
| 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). |
| [options.FilterPattern] | <code>String</code> | <code>&#x27;&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern). |
* `options` **[Object][59]** Options.
* `options.LogicalName` **[String][60]** The logical name of the SQS queue
within the CloudFormation template. This is also used to construct the logical
names of the other resources.
* `options.VisibilityTimeout` **[Number][70]** See [AWS documentation][110]. (optional, default `300`)
* `options.maxReceiveCount` **[Number][70]** See [AWS documentation][111]. (optional, default `10`)
* `options.ContentBasedDeduplication` **[Boolean][99]** See [AWS documentation][112]. (optional, default `undefined`)
* `options.DelaySeconds` **[Number][70]** See [AWS documentation][113]. (optional, default `undefined`)
* `options.FifoQueue` **[Boolean][99]** See [AWS documentation][114]. (optional, default `undefined`)
* `options.KmsMasterKeyId` **[String][60]** See [AWS documentation][115]. (optional, default `undefined`)
* `options.KmsDataKeyReusePeriodSeconds` **[Number][70]** See [AWS documentation][116]. (optional, default `undefined`)
* `options.MaximumMessageSize` **[Number][70]** See [AWS documentation][117]. (optional, default `undefined`)
* `options.MessageRetentionPeriod` **[Number][70]** See [AWS documentation][118]. (optional, default `1209600`)
* `options.QueueName` **[String][60]** See [AWS documentation][119].
If `FifoQueue` is `true`, the suffix `.fifo` will be added to the queue name. (optional, default `'${stack name}-${logical name}'`)
* `options.ReceiveMessageWaitTimeSeconds` **[Number][70]** See [AWS documentation][120]. (optional, default `undefined`)
* `options.Condition` **[String][60]** 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][78]. (optional, default `undefined`)
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
to this SQS queue. See [AWS documentation][79]. (optional, default `undefined`)
* `options.ExistingTopicArn` **[String][60]?** 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.
* `options.TopicName` **[String][60]** See [AWS documentation][121].
This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics. (optional, default `'${stack name}-${logical name}'`)
* `options.DisplayName` **[String][60]** See [AWS documentation][122]. (optional, default `undefined`)
* `options.DeadLetterVisibilityTimeout` **[Number][70]** [VisibilityTimeout][110] for the dead-letter queue. (optional, default `300`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -460,49 +472,34 @@

const queue = new cf.shortcuts.Queue({
LogicalName: 'MyQueue'
const lambda = new cf.shortcuts.LogSubscriptionLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
LogGroupName: 'my-log-group'
});
module.exports = cf.merge(myTemplate, queue);
module.exports = cf.merge(myTemplate, lambda);
```
<a name="QueueLambda"></a>
## S3KinesisFirehose
## QueueLambda
A Lambda function that runs in response to messages in an SQS queue.
Includes a Log Group, a Role, an Alarm on function errors, and an event source
mapping.
**Extends KinesisFirehoseBase**
**Kind**: global class
<a name="new_QueueLambda_new"></a>
Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
Also creates a CloudWatch alarm on the `DeliveryToS3.DataFreshness` metric -- the age
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
By default, if that metric exceeds double the `BufferingIntervalInSeconds`, the
alarm is triggered.
### new QueueLambda(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
| 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). |
| 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). |
| [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). |
* `options` **[Object][59]** Options.
* `options.LogicalName` **[String][60]** 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.
* `options.DestinationBucket` **[String][60]** The name of the S3 bucket to write to.
* `options.Prefix` **[String][60]** The prefix path (folder) within the DestinationBucket to write to. (optional, default `'raw/${logical name}/'`)
* `options.KinesisStreamARN` **([String][60] | [Object][59])** The ARN of a source Kinesis Stream. (optional, default `undefined`)
* `options.BufferingIntervalInSeconds` **[Number][70]** See [AWS documentation][123]. (optional, default `900`)
* `options.BufferingSizeInMBs` **[Number][70]** See [AWS documentation][124]. (optional, default `128`)
* `options.AlarmName` **[String][60]** See [AWS documentation][80]. (optional, default `'${stack name}-${logical name}-Freshness-${region}'`)
* `options.AlarmDescription` **[String][60]** See [AWS documentation][81]. (optional, default `'Freshness alarm for ${stack name}-${logical name} kinesis firehose in ${stack name} stack'`)
* `options.AlarmActions` **[Array][68]<[String][60]>** See [AWS documentation][82]. (optional, default `[]`)
* `options.Period` **[Number][70]** See [AWS documentation][83]. (optional, default `60`)
* `options.EvaluationPeriods` **[Number][70]** See [AWS documentation][84]. (optional, default `1`)
* `options.Statistic` **[String][60]** See [AWS documentation][85]. (optional, default `'Maximum'`)
* `options.Threshold` **[Number][70]** See [AWS documentation][87]. (optional, default `(BufferingIntervalInSeconds*2)`)
* `options.ComparisonOperator` **[String][60]** See [AWS documentation][88]. (optional, default `'GreaterThanThreshold'`)
* `options.TreatMissingData` **[String][60]** See [AWS documentation][89]. (optional, default `'notBreaching'`)
* `options.EvaluateLowSampleCountPercentile` **[String][60]** See [AWS documentation][90]. (optional, default `undefined`)
* `options.ExtendedStatistic` **[String][60]** See [AWS documentation][91]] (optional, default `undefined`)
* `options.OKActions` **[Array][68]<[String][60]>** See [AWS documentation][92]. (optional, default `undefined`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -512,50 +509,54 @@

const firehose = new cf.shortcuts.S3KinesisFirehose({
LogicalName: 'MyKinesisFirehose',
DestinationBucket: 'mah-bukkit'
const lambda = new cf.shortcuts.QueueLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
EventSourceArn: cf.getAtt('MyQueue', 'Arn'),
ReservedConcurrentExecutions: 30
});
module.exports = cf.merge(myTemplate, firehose);
module.exports = cf.merge(myTemplate, lambda);
```
<a name="Queue"></a>
## KinesisFirehoseBase
## Queue
Creates an SQS queue with an attached dead-letter queue.
Base class for creating a Kinesis Firehouse that can receive records
by direct put or by consuming a Kinesis Stream.
Each implementing subclass enables writing to a specific destination.
Creates a Kinesis Firehouse delivery stream, sets up logging and creates
a policy allowing records to be delivered to the delivery stream.
Standard (non-FIFO) queues can receive messages through an SNS topic. The
shortcut either creates a new SNS topic that can be used for sending messages
into the queue, or subscribes the queue to an existing SNS topic provided
with the `ExistingTopicArn` option. For FIFO queues, no SNS topic is created
and `ExistingTopicArn` is ignored.
### Parameters
**Kind**: global class
<a name="new_Queue_new"></a>
* `options` **[Object][59]** Options.
### new Queue(options)
* `options.LogicalName` **[String][60]** 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.
* `options.KinesisStreamARN` **([String][60] | [Object][59])** The ARN of a source Kinesis Stream. (optional, default `undefined`)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| 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. |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [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). |
| [options.QueueName] | <code>String</code> | <code>&#x27;${stack name}-${logical name}&#x27;</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. |
| [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). |
| [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). |
| [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). |
| [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. |
| [options.TopicName] | <code>String</code> | <code>&#x27;${stack name}-${logical name}&#x27;</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. |
| [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). |
| [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. |
## GlueDatabase
Create a Glue Database.
### Parameters
* `options` **[Object][59]** Options.
* `options.LogicalName` **[String][60]** The logical name of the Glue Database within the CloudFormation template.
* `options.Name` **[String][60]** The name of the database. See [AWS documentation][125].
* `options.CatalogId` **[String][60]** The AWS account ID for the account in which to create the database. See [AWS documentation][126]. (optional, default `AccountId`)
* `options.Description` **[String][60]** The description of the database. See [AWS documentation][127]. (optional, default `'Created by the ${AWS::StackName} CloudFormation stack'`)
* `options.LocationUri` **[String][60]** The location of the database. See [AWS documentation][128]. (optional, default `undefined`)
* `options.Parameters` **[String][60]** Parameters of the database. See [AWS documentation][129]. (optional, default `undefined`)
* `options.Condition` **[String][60]** 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][78]. (optional, default `undefined`)
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
to this database. See [AWS documentation][79]. (optional, default `undefined`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -565,57 +566,34 @@

const db = new cf.shortcuts.GlueDatabase({
LogicalName: 'MyDatabase',
Name: 'my_database'
const queue = new cf.shortcuts.Queue({
LogicalName: 'MyQueue'
});
module.exports = cf.merge(myTemplate, db);
module.exports = cf.merge(myTemplate, queue);
```
<a name="Role"></a>
## GlueTable
## Role
Create an IAM role.
Create a Glue Table.
**Kind**: global class
<a name="new_Role_new"></a>
Pre-configured versions of this shortcut are available for tables stored as line-delimited JSON or ORC:
### new Role(options)
* [GlueJsonTable][39]
* [GlueOrcTable][41]
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| options.LogicalName | <code>String</code> | | The logical name of the IAM role within the CloudFormation template. |
| options.AssumeRolePrincipals | <code>Array.&lt;Object&gt;</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). |
| [options.Statement] | <code>Array.&lt;Object&gt;</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). |
| [options.ManagedPolicyArns] | <code>Array.&lt;String&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-managepolicyarns). |
| [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). |
| [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). |
| [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). |
| [options.Tags] | <code>Array.&lt;Object&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-tags). |
| [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). |
| [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). |
### Parameters
* `options` **[Object][59]** Options.
* `options.LogicalName` **[String][60]** The logical name of the Glue Table within the CloudFormation template.
* `options.Name` **[String][60]** The name of the table. See [AWS documentation][130].
* `options.DatabaseName` **[String][60]** The name of the database the table
resides in. See [AWS documentation][131].
* `options.Columns` **[Array][68]<[Object][59]>** List of the table's columns. See [AWS documentation][132].
* `options.CatalogId` **[String][60]** The AWS account ID for the account in which to create the table. See [AWS documentation][133]. (optional, default `AccountId`)
* `options.Owner` **[String][60]** The table owner. See [AWS documentation][134]. (optional, default `undefined`)
* `options.Parameters` **[Object][59]** Table parameters. See [AWS documentation][135]. (optional, default `undefined`)
* `options.PartitionKeys` **[Array][68]<[String][60]>** List of partitioning columns. See [AWS documentation][136]. (optional, default `[]`)
* `options.Description` **[String][60]** The description of the table. See [AWS documentation][137]. (optional, default `'Created by the ${AWS::StackName} CloudFormation stack'`)
* `options.Retention` **[Number][70]** Retention time for the table. See [AWS documentation][138]. (optional, default `undefined`)
* `options.TableType` **[String][60]** The type of this table. See [AWS documentation][139]. (optional, default `undefined`)
* `options.ViewExpandedText` **[String][60]** The expanded text of the view. See [AWS documentation][140]. (optional, default `undefined`)
* `options.ViewOriginalText` **[String][60]** The original text of the view. See [AWS documentation][141]. (optional, default `undefined`)
* `options.BucketColumns` **[Array][68]<[String][60]>** List of bucketing columns. See [AWS documentation][142]. (optional, default `undefined`)
* `options.Compressed` **[Boolean][99]** Whether the data is compressed. See [AWS documentation][143]. (optional, default `false`)
* `options.InputFormat` **[String][60]** The table's input format. See [AWS documentation][144]. (optional, default `undefined`)
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145]. (optional, default `''`)
* `options.NumberOfBuckets` **[Number][70]** See [AWS documentation][146]. (optional, default `0`)
* `options.OutputFormat` **[String][60]** The table's output format. See [AWS documentation][147]. (optional, default `undefined`)
* `options.StorageParameters` **[Object][59]** Storage parameters. See [AWS documentation][148]. (optional, default `undefined`)
* `options.SerdeInfo` **[Object][59]** The serialization/deserialization information. See [AWS documentation][149]. (optional, default `{}`)
* `options.SkewedInfo` **[Object][59]** Frequent value information. See [AWS documentation][150]. (optional, default `undefined`)
* `options.SortColumns` **[Array][68]<[Object][59]>** List specifying the sort order. See [AWS documentation][151]. (optional, default `undefined`)
* `options.StoredAsSubDirectories` **[Boolean][99]** See [AWS documentation][152]. (optional, default `true`)
* `options.Condition` **[String][60]** 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][78]. (optional, default `undefined`)
* `options.DependsOn` **[String][60]** Specify a stack resource dependency
to this database. See [AWS documentation][79]. (optional, default `undefined`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -625,245 +603,162 @@

const table = new cf.shortcuts.GlueTable({
LogicalName: 'MyTable',
DatabaseName: 'my_database',
Name: 'my_table',
Columns: [
{ Name: 'column_name', Type: 'string', Comment: 'my_column description' }
const role = new cf.shortcuts.Role({
LogicalName: 'MyRole',
AssumeRolePrincipals: [
{ Service: 'ec2.amazonaws.com' }
],
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
]
});
module.exports = cf.merge(myTemplate, table);
module.exports = cf.merge(myTemplate, role);
```
<a name="S3KinesisFirehose"></a>
## GlueJsonTable
## S3KinesisFirehose
Creates a Kinesis Firehouse that can receive records by direct put or by consuming a Kinesis Stream
and writes out to the specific S3 destination. Creates a Kinesis Firehouse delivery stream,
sets up logging, and creates a policy allowing records to be delivered to the delivery stream.
Also creates a CloudWatch alarm on the `DeliveryToS3.DataFreshness` metric -- the age
of the oldest record in Kinesis Data Firehose (from entering the Kinesis Data Firehose until now).
By default, if that metric exceeds double the `BufferingIntervalInSeconds`, the
alarm is triggered.
**Extends GlueTable**
**Kind**: global class
<a name="new_S3KinesisFirehose_new"></a>
Create a Glue Table backed by line-delimited JSON files on S3.
### new S3KinesisFirehose(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Options. |
| 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. |
| options.DestinationBucket | <code>String</code> | | The name of the S3 bucket to write to. |
| [options.Prefix] | <code>String</code> | <code>&#x27;raw/${logical name}/&#x27;</code> | The prefix path (folder) within the DestinationBucket to write to. |
| [options.KinesisStreamARN] | <code>String</code> \| <code>Object</code> | | The ARN of a source Kinesis Stream. |
| [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). |
| [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). |
| [options.AlarmName] | <code>String</code> | <code>&#x27;${stack name}-${logical name}-Freshness-${region}&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname). |
| [options.AlarmDescription] | <code>String</code> | <code>&#x27;Freshness alarm for ${stack name}-${logical name} kinesis firehose in ${stack name} stack&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription). |
| [options.AlarmActions] | <code>Array.&lt;String&gt;</code> | <code>[]</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions). |
| [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). |
| [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). |
| [options.Statistic] | <code>String</code> | <code>&#x27;Maximum&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic). |
| [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). |
| [options.ComparisonOperator] | <code>String</code> | <code>&#x27;GreaterThanThreshold&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator). |
| [options.TreatMissingData] | <code>String</code> | <code>&#x27;notBreaching&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata). |
| [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). |
| [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)] |
| [options.OKActions] | <code>Array.&lt;String&gt;</code> | | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions). |
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
**Example**
```js
const cf = require('@mapbox/cloudfriend');
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145].
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'EXTERNAL_TABLE'`)
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.mapred.TextInputFormat'`)
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'`)
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
const myTemplate = { ... };
* `options.SerdeInfo.SerializationLibrary` **[Object][59]** Hard-wired by this shortcut. (optional, default `'org.openx.data.jsonserde.JsonSerDe'`)
const firehose = new cf.shortcuts.S3KinesisFirehose({
LogicalName: 'MyKinesisFirehose',
DestinationBucket: 'mah-bukkit'
});
## GlueOrcTable
module.exports = cf.merge(myTemplate, firehose);
```
<a name="ScheduledLambda"></a>
**Extends GlueTable**
## ScheduledLambda
A Lambda function that runs on in response to a CloudWatch Event. Includes
a Log Group, a Role, an Alarm on function errors, a CloudWatch Event Rule, and
a Lambda permission.
Create a Glue Table backed by ORC files on S3.
**Kind**: global class
<a name="new_ScheduledLambda_new"></a>
### Parameters
### new ScheduledLambda(options)
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
| 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). |
| [options.State] | <code>String</code> | <code>&#x27;ENABLED&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state). |
* `options.Location` **[String][60]** The physical location of the table. See [AWS documentation][145].
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'EXTERNAL_TABLE'`)
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'`)
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'`)
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
* `options.SerdeInfo.SerializationLibrary` **[Object][59]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.orc.OrcSerde'`)
## GlueParquetTable
**Extends GlueTable**
Create a Glue table backed by Parquet files on S3.
### Parameters
* `options` **[Object][59]** Accepts the same options as cloudfriend's
[`GlueTable`][153],
though the following additional attributes are either required or hard-wired:
* `options.Location` **[String][60]** The physical location of the table. See
[AWS
documentation][145].
* `options.TableType` **[String][60]** Hard-wired by this
shortcut. (optional, default `'EXTERNAL_TABLE'`)
* `options.InputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'`)
* `options.OutputFormat` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'`)
* `options.SerdeInfo` **[Object][59]?** Hard-wired by this shortcut.
* `options.SerdeInfo.SerializationLibrary` **[String][60]** Hard-wired by this shortcut. (optional, default `'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'`)
## GluePrestoView
**Extends GlueTable**
Create a Glue Presto View.
### Parameters
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
* `options.OriginalSql` **[String][60]** The SQL query that defines the view.
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'VIRTUAL_VIEW'`)
## GlueSparkView
**Extends GlueTable**
Create a Glue Presto View.
### Parameters
* `options` **[Object][59]** Accepts the same options as [`GlueTable`][36], though the following additional attributes are either required or hard-wired:
* `options.OriginalSql` **[String][60]** The SQL query that defines the view.
* `options.TableType` **[String][60]** Hard-wired by this shortcut. (optional, default `'VIRTUAL_VIEW'`)
## hookshot.Passthrough
The hookshot.Passthrough class defines resources that set up a single API Gateway
endpoint that responds to `POST` and `OPTIONS` requests. You are expected to
provide a Lambda function that will receive the request, and return some
response to the caller.
Note that in this case, your Lambda function will receive every HTTP `POST`
request that arrives at the API Gateway URL that hookshot helped you create.
You are responsible for any authentication that should be performed against
incoming requests.
Your Lambda function will receive an event object which includes the request
method, headers, and body, as well as other data specific to the API Gateway
endpoint created by hookshot. See [AWS documentation here][154]
for a full description of the incoming data.
To work properly, **your lambda function must return a data object
matching in a specific JSON format**. Again, see [AWS documentation for a full description][155].
Your API Gateway endpoint will allow cross-origin resource
sharing (CORS) required by requests from any webpage. Preflight `OPTIONS`
requests will receive a `200` response with CORS headers. And the response
you return from your Lambda function will be modified to include CORS headers.
The generated template's `Outputs` will include the URL for the API Gateway endpoint,
and a random string that can be used as a shared secret.
### Parameters
* `Prefix` **[String][60]** This will be used to prefix the set of CloudFormation
resources created by this shortcut.
* `PassthroughTo` **[String][60]** The logical name of the Lambda function that you
have written which will receive a request and generate a response to provide
to the caller.
* `LoggingLevel` **[String][60]** One of `OFF`, `INFO`, or `ERROR`. Logs are delivered
to a CloudWatch Log Group named `API-Gateway-Execution-Logs_{rest-api-id}/hookshot`. (optional, default `'OFF'`)
* `DataTraceEnabled` **[Boolean][99]** Set to `true` to enable full request/response
logging in the API's logs. (optional, default `false`)
* `MetricsEnabled` **[Boolean][99]** Set to `true` to enable additional metrics in CloudWatch. (optional, default `false`)
* `AccessLogFormat` **[String][60]?** A single line format of the access logs of
data, as specified by selected `$context` variables. The format must include at
least `$context.requestId`. [See AWS documentation for details][156].
* `WebhookSecret` **([String][60] | [Object][59])?** A secret string to be used to verify
payload signatures that are delivered to the endpoint. This is optional. If
not specified, a string will be generated for you. Implementation of
signature verification is up to the caller.
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');
const myTemplate = {
...
Resources: {
MyLambdaFunction: {
Type: 'AWS::Lambda::Function',
Properties: { ... }
}
}
};
const myTemplate = { ... };
const webhook = new cf.shortcuts.hookshot.Passthrough({
Prefix: 'Webhook',
PassthroughTo: 'MyLambdaFunction'
const lambda = new cf.shortcuts.ScheduledLambda({
LogicalName: 'MyLambda',
Code: {
S3Bucket: 'my-code-bucket',
S3Key: 'path/to/code.zip'
},
ScheduleExpression: 'cron(45 * * * ? *)',
});
module.exports = cf.merge(myTemplate, webhook);
module.exports = cf.merge(myTemplate, lambda);
```
<a name="ServiceRole"></a>
## hookshot.Github
## ServiceRole
Create an IAM role that will be assumed by an AWS service, e.g. Lambda or ECS.
The hookshot.Github class defines resources that set up a single API Gateway
endpoint that is designed responds to POST requests sent from GitHub in
response to various GitHub events. The hookshot system will use a shared
secret to validate that the incoming payload did in fact originate from GitHub,
before sending the event payload to your Lambda function for further
processing. Any requests that did not come from GitHub or were not properly
signed using your secret key are rejected, and will never make it to your
Lambda function.
**Kind**: global class
<a name="new_ServiceRole_new"></a>
### Parameters
### new ServiceRole(options)
* `Prefix` **[String][60]** this will be used to prefix the set of CloudFormation
resources created by this shortcut.
* `PassthroughTo` **[String][60]** the logical name of the Lambda function that you
have written which will receive a request and generate a response to provide
to the caller.
* `LoggingLevel` **[String][60]** one of `OFF`, `INFO`, or `ERROR`. Logs are delivered
to a CloudWatch LogGroup named `API-Gateway-Execution-Logs_{rest-api-id}/hookshot`
* `WebhookSecret` **([String][60] | [Object][59])?** A secret string to be used to verify
payload signatures that are delivered to the endpoint. This is optional. If
not specified, a string will be generated for you. You should provide this
value to GitHub, and signature verification will be performed before your
Lambda function being invoked to respond to the event.
| Param | Type | Description |
| --- | --- | --- |
| 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: |
| options.Service | <code>String</code> | The name of the AWS service that will assume this role, e.g. `lambda`. |
### Properties
**Example**
```js
const cf = require('@mapbox/cloudfriend');
* `Resources` **[Object][59]** the CloudFormation resources created by this shortcut.
* `Outputs` **[Object][59]** the CloudFormation outputs created by this
shortcut. This includes the URL for the API Gateway endpoint, and a secret
string. Use these two values to configure GitHub to send webhooks to your
API Gateway endpoint.
const myTemplate = { ... };
### Examples
```javascript
const cf = require('@mapbox/cloudfriend');
const myTemplate = {
...
Resources: {
MyLambdaFunction: {
Type: 'AWS::Lambda::Function',
Properties: { ... }
const role = new cf.shortcuts.ServiceRole({
LogicalName: 'MyRole',
Service: 'lambda',
Statement: [
{
Effect: 'Allow',
Action: 's3:GetObject',
Resource: 'arn:aws:s3:::my-bucket/my/data.tar.gz'
}
}
};
const webhook = new cf.shortcuts.hookshot.Github({
Prefix: 'Webhook',
PassthroughTo: 'MyLambdaFunction'
]
});
module.exports = cf.merge(myTemplate, webhook);
module.exports = cf.merge(myTemplate, role);
```
<a name="StreamLambda"></a>
## LogSubscriptionLambda
## StreamLambda
A Lambda function that runs in response to events in a DynamoDB or Kinesis
stream. Includes a Log Group, a Role, an Alarm on function errors, and an event
source mapping.
**Extends Lambda**
**Kind**: global class
<a name="new_StreamLambda_new"></a>
A Lambda function that runs in response to a log subscription filter.
Includes a Log Group, a Role, an Alarm on function errors, a CloudWatch Subscription Filter,
and a Lambda permission.
### new StreamLambda(options)
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| options | <code>Object</code> | | Extends the options for [`Lambda`](#lambda) with the following additional attributes: |
| 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). |
| [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). |
| [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). |
| [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). |
| [options.StartingPosition] | <code>String</code> | <code>&#x27;LATEST&#x27;</code> | See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition). |
* `options` **[Object][59]** Extends the options for [`Lambda`][1] with the following additional attributes:
* `options.LogGroupName` **[String][60]** See [AWS documentation][157].
* `options.FilterPattern` **[String][60]** See [AWS documentation][158]. (optional, default `''`)
### Examples
```javascript
**Example**
```js
const cf = require('@mapbox/cloudfriend');

@@ -873,3 +768,3 @@

const lambda = new cf.shortcuts.LogSubscriptionLambda({
const lambda = new cf.shortcuts.StreamLambda({
LogicalName: 'MyLambda',

@@ -880,3 +775,3 @@ Code: {

},
LogGroupName: 'my-log-group'
EventSourceArn: cf.getAtt('MyStream', 'Arn')
});

@@ -886,317 +781,1 @@

```
[1]: #lambda
[2]: #parameters
[3]: #examples
[4]: #scheduledlambda
[5]: #parameters-1
[6]: #examples-1
[7]: #eventlambda
[8]: #parameters-2
[9]: #examples-2
[10]: #queuelambda
[11]: #parameters-3
[12]: #examples-3
[13]: #streamlambda
[14]: #parameters-4
[15]: #examples-4
[16]: #role
[17]: #parameters-5
[18]: #examples-5
[19]: #crossaccountrole
[20]: #parameters-6
[21]: #examples-6
[22]: #servicerole
[23]: #parameters-7
[24]: #examples-7
[25]: #queue
[26]: #parameters-8
[27]: #examples-8
[28]: #s3kinesisfirehose
[29]: #parameters-9
[30]: #examples-9
[31]: #kinesisfirehosebase
[32]: #parameters-10
[33]: #gluedatabase
[34]: #parameters-11
[35]: #examples-10
[36]: #gluetable
[37]: #parameters-12
[38]: #examples-11
[39]: #gluejsontable
[40]: #parameters-13
[41]: #glueorctable
[42]: #parameters-14
[43]: #glueparquettable
[44]: #parameters-15
[45]: #glueprestoview
[46]: #parameters-16
[47]: #gluesparkview
[48]: #parameters-17
[49]: #hookshotpassthrough
[50]: #parameters-18
[51]: #examples-12
[52]: #hookshotgithub
[53]: #parameters-19
[54]: #properties
[55]: #examples-13
[56]: #logsubscriptionlambda
[57]: #parameters-20
[58]: #examples-14
[59]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[60]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[61]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html
[62]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
[63]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description
[64]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment
[65]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname
[66]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler
[67]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn
[68]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[69]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers
[70]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[71]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize
[72]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-reservedconcurrentexecutions
[73]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime
[74]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags
[75]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout
[76]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig
[77]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig
[78]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html
[79]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
[80]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname
[81]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription
[82]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions
[83]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-period
[84]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluationperiods
[85]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic
[86]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarm-datapointstoalarm
[87]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold
[88]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator
[89]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata
[90]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluatelowsamplecountpercentile
[91]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-extendedstatistic
[92]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions
[93]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression
[94]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state
[95]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern
[96]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn
[97]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize
[98]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds
[99]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[100]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled
[101]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition
[102]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
[103]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html?shortFooter=true#cfn-iam-role-assumerolepolicydocument
[104]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html#cfn-iam-policies-policydocument
[105]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-managepolicyarns
[106]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-maxsessionduration
[107]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-path
[108]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-rolename
[109]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-tags
[110]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout
[111]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues-redrivepolicy.html#aws-sqs-queue-redrivepolicy-maxcount
[112]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-contentbaseddeduplication
[113]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-delayseconds
[114]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-fifoqueue
[115]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsmasterkeyid
[116]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsdatakeyreuseperiodseconds
[117]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-maxmsgsize
[118]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod
[119]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-name
[120]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-receivemsgwaittime
[121]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-name
[122]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-displayname
[123]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-intervalinseconds
[124]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-bufferinghints.html#cfn-kinesisfirehose-deliverystream-bufferinghints-sizeinmbs
[125]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-name
[126]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-database.html#cfn-glue-database-catalogid
[127]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description
[128]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-locationuri
[129]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-parameters
[130]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-name
[131]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-databasename
[132]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-columns
[133]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-table.html#cfn-glue-table-catalogid
[134]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-owner
[135]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters
[136]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-partitionkeys
[137]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-description
[138]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-retention
[139]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-tabletype
[140]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-viewexpandedtext
[141]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-vieworiginaltext
[142]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-bucketcolumns
[143]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-compressed
[144]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-inputformat
[145]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-location
[146]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-numberofbuckets
[147]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-outputformat
[148]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-parameters
[149]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-serdeinfo
[150]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-skewedinfo
[151]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-sortcolumns
[152]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-storagedescriptor.html#cfn-glue-table-storagedescriptor-storedasdubdirectories
[153]: https://github.com/mapbox/cloudfriend/blob/master/lib/shortcuts/glue-table.js
[154]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
[155]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format
[156]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-stage-accesslogsetting.html#cfn-apigateway-stage-accesslogsetting-format
[157]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-loggroupname
[158]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern
{
"name": "@mapbox/cloudfriend",
"version": "6.0.0-SNAPSHOT-1",
"version": "6.0.0",
"description": "Helper functions for assembling CloudFormation templates in JavaScript",

@@ -14,3 +14,3 @@ "main": "index.js",

"build-ci-template": "bin/build-template.js cloudformation/ci.template.js > cloudformation/ci.template.json",
"shortcuts-api-doc": "documentation build lib/shortcuts/index.js -f md -o lib/shortcuts/api.md"
"shortcuts-api-doc": "jsdoc2md lib/shortcuts/*.js > lib/shortcuts/api.md"
},

@@ -37,5 +37,5 @@ "bin": {

"@mapbox/eslint-config-mapbox": "^1.2.1",
"documentation": "^14.0.0",
"eslint": "^4.18.2",
"eslint-plugin-node": "^6.0.1",
"jsdoc-to-markdown": "^7.1.1",
"nyc": "^14.1.0",

@@ -42,0 +42,0 @@ "opener": "^1.4.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc