0

有没有办法通过 cloudformation 启动 kinesis 数据分析应用程序?

这些说明中,在启动应用程序部分下,有关于如何通过控制台或 aws cli 启动 Kinesis Data Analytics 应用程序的说明。

有什么方法可以使用 cloudformation 而不是 cli 或控制台来启动应用程序?

先感谢您。

4

2 回答 2

1

There is a way, but unfortunately, its not that straightforward.

The first way would involve create a custom resource in CloudFormation. The resource would be a lambda, which you would write to start the Kinesis App from the CloudFormation.

The second would be through a non-elegant substitute for a custom resource, but much easier to setup. This is done by using smallest instance possible (e.g. t2.nano) with instance shutdown behaviour set to terminate. So your template creates that instances, in UserData you start the Kinesis app, and shutdown the instance (shutdown -h now). This will terminate the instance after the start of the Kinesis due to shutdown behavior.

Other ways would involve setting up notification when your cloudformation successfully deploys, and the notification would trigger a lambda which would start the Kinesis.

Hope this helps.

于 2020-06-09T21:49:45.537 回答
0

如果使用无服务器框架来部署 Kinesis Data Analytics CloudFormation 资源,则自定义插件是另一种选择。使用插件的优点是不需要自定义资源、ec2s 或 lambdas。

于 2022-01-18T01:03:13.413 回答