AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::KinesisAnalyticsV2::Application

The AWS::KinesisAnalyticsV2::Application resource creates an Amazon Kinesis Data Analytics application. For more information, see the Amazon Kinesis Data Analytics Developer Guide.

Syntax

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

JSON

{ "Type" : "AWS::KinesisAnalyticsV2::Application", "Properties" : { "ApplicationName" : String, "RuntimeEnvironment" : String, "ApplicationConfiguration" : ApplicationConfiguration, "ApplicationDescription" : String, "ServiceExecutionRole" : String } }

YAML

Type: "AWS::KinesisAnalyticsV2::Application" Properties: ApplicationName: String RuntimeEnvironment: String ApplicationConfiguration: ApplicationConfiguration ApplicationDescription: String ServiceExecutionRole: String

Properties

ApplicationName

The name of your Amazon Kinesis Analytics application (for example, sample-app).

Required: No

Type: String

Update requires: Replacement

RuntimeEnvironment

The runtime environment for the application (SQL-1.0 or FLINK-1_6).

Required: Yes

Type: String

Update requires: Replacement

ApplicationConfiguration

Use this parameter to configure the application.

Required: No

Type: ApplicationConfiguration

Update requires: No interruption

ApplicationDescription

A summary description of the application.

Required: No

Type: String

Update requires: No interruption

ServiceExecutionRole

The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.

Required: Yes

Type: String

Update requires: No interruption

Examples

Application Example

The following example creates an Application resource.

YAML

Description: "Sample KinesisAnalytics via CloudFormation" Resources: BasicApplication: Type: AWS::KinesisAnalyticsV2::Application Properties: ApplicationName: "sampleApplication" ApplicationDescription: "SampleApp" RuntimeEnvironment: "SQL-1_0" ServiceExecutionRole: !GetAtt ServiceExecutionRole.Arn ApplicationConfiguration: SqlApplicationConfiguration: Inputs: - NamePrefix: "exampleNamePrefix" InputSchema: RecordColumns: - Name: "example" SqlType: "VARCHAR(16)" Mapping: "$.example" RecordFormat: RecordFormatType: "JSON" MappingParameters: JSONMappingParameters: RecordRowPath: "$" KinesisStreamsInput: ResourceARN: !GetAtt SQLCanaryInputStream.Arn ApplicationCodeConfiguration: CodeContent: TextContent: "Example Application Code" CodeContentType: "PLAINTEXT" ServiceExecutionRole: Type: "AWS::IAM::Role" Properties: AssumeRolePolicyDocument: Version: "2012-10-17" Statement: - Effect: "Allow" Principal: Service: "kinesisanalytics.amazonaws.com" Action: "sts:AssumeRole" Path: "/" Policies: - PolicyName: "Open" PolicyDocument: Version: "2012-10-17" Statement: - Effect: "Allow" Action: "*" Resource: "*" InputKinesisStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 KinesisAnalyticsRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: "2012-10-17" Statement: - Effect: Allow Principal: Service: "kinesisanalytics.amazonaws.com" Action: "sts:AssumeRole" Path: "/" Policies: - PolicyName: Open PolicyDocument: Version: "2012-10-17" Statement: - Effect: Allow Action: "*" Resource: "*" BasicApplicationOutputs: Type: AWS::KinesisAnalytics::ApplicationOutput DependsOn: BasicApplication Properties: ApplicationName: !Ref BasicApplication Output: Name: "exampleOutput" DestinationSchema: RecordFormatType: "CSV" KinesisStreamsOutput: ResourceARN: !GetAtt OutputKinesisStream.Arn RoleARN: !GetAtt KinesisAnalyticsRole.Arn OutputKinesisStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 BasicApplicationReferenceDataSource: Type: AWS::KinesisAnalytics::ApplicationReferenceDataSource DependsOn: BasicApplicationOutputs 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 S3Bucket: Type: AWS::S3::Bucket Outputs: ApplicationPhysicalResourceId: Value: !Ref BasicApplication

On this page: