I wanted to create a Kinesis resource through cloud formation template and it wouldn't let me provide a "StreamName" as property for the resource.
"KinesisResource":{
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"ShardCount" : 1
"StreamName":"KinesisStream"
}
},
It says "unrecognizable property "StreamName". how do I give a Stream Name in my template. Thanks, Nithya.
Note: To reference a resource in another AWS CloudFormation stack, you must create cross-stack references. To create a cross-stack reference, use the export field to flag the value of a resource output for export.
Create a stack from existing resources using the AWS Management Console. Sign in to the AWS Management Console and open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation . On the Stacks page, choose Create stack, and then choose With existing resources (import resources).
They can help you manage both AWS and non-AWS resources such as AWS application resources and non-AWS SaaS software services such as monitoring, team productivity, incident management, or version control management tools.
Apparently you can't specify a Stream name as of now. The Kinesis Documentation for the CloudFormation supports only ShardCount as the only parameter.
You can perhaps get the Kinesis stream name as part of the CloudFormation Output - using
{ "Ref" : "< resource name of instance of - AWS::Kinesis::Stream>" }
As of now the name of stream is created in the pattern of <Stack-Name> - <Stream Name - Resoruce Name> - < Arbitrary Info >
Stack Name : MyKinesisStack
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"KinesisStream1" : {
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"ShardCount" : "1"
}
}
},
"Outputs" : {
"KinesisStreamName" : {
"Description" : "Kenisis Stream Name",
"Value" : { "Ref" : "KinesisStream1"}
}
}
}
The above stack would create a Kinesis Stream with the name - MyKinesisStack-KinesisStream1-ARTSDY32AS
This has been solved with Name in Property.
{
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"Name" : String,
"ShardCount" : Integer,
"Tags" : [ Resource Tag, ... ]
}
}
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With