AWS::KinesisAnalytics::ApplicationReferenceDataSource - AWS CloudFormation

AWS::KinesisAnalytics::ApplicationReferenceDataSource

Adds a reference data source to an existing application.

Amazon Kinesis Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table within your application. In the request, you provide the source (S3 bucket name and object key name), name of the in-application table to create, and the necessary mapping information that describes how data in Amazon S3 object maps to columns in the resulting in-application table.

For conceptual information, see Configuring Application Input. For the limits on data sources you can add to your application, see Limits.

This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput action.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::KinesisAnalytics::ApplicationReferenceDataSource", "Properties" : { "ApplicationName" : String, "ReferenceDataSource" : ReferenceDataSource } }

YAML

Type: AWS::KinesisAnalytics::ApplicationReferenceDataSource Properties: ApplicationName: String ReferenceDataSource: ReferenceDataSource

Properties

ApplicationName

Name of an existing application.

Required: Yes

Type: String

Pattern: [a-zA-Z0-9_.-]+

Minimum: 1

Maximum: 128

Update requires: Replacement

ReferenceDataSource

The reference data source can be an object in your Amazon S3 bucket. Amazon Kinesis Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting in-application table that is created. You must also provide an IAM role with the necessary permissions that Amazon Kinesis Analytics can assume to read the object from your S3 bucket on your behalf.

Required: Yes

Type: ReferenceDataSource

Update requires: No interruption

Return values

Fn::GetAtt

Examples

Adding an ApplicationReferenceDataSource Resource

The following example creates an ApplicationReferenceDataSource resource:

YAML

ApplicationReferenceDataSource: Type: AWS::KinesisAnalytics::ApplicationReferenceDataSource Properties: ApplicationName: !Ref BasicApplication ReferenceDataSource: TableName: "exampleTable" ReferenceSchema: RecordColumns: - Name: "example" SqlType: "VARCHAR(16)" Mapping: "$.example" RecordFormat: RecordFormatType: "JSON" MappingParameters: JSONMappingParameters: RecordRowPath: "$" S3ReferenceDataSource: BucketARN: !GetAtt S3Bucket.Arn FileKey: 'fakeKey' ReferenceRoleARN: !GetAtt KinesisAnalyticsRole.Arn