Can AWS CloudFormation call the AWS API?

99封情书 提交于 2020-01-02 07:03:43

问题


I'm trying to use CloudFormation to create my AWS environment and part of that is setting up Elastic Transcoder. Unfortunately it seems like ET is not part of the existing CloudFormation system, but it can be created via API calls. Is there any way to call the API from CloudFormation?


回答1:


You can create custom resources, in particular you can create lambda backed custom resources.

With these your lambda function is called with data from the template passed in the event object and a presigned s3 URL. You do whatever work you need to do and then write a JSON document to that presigned URL. The JSON document describes the created resource. This document contains some sort of identifier for the created resource (used for update and delete requests) and any data about the resource that the remainder of your template might need.



来源:https://stackoverflow.com/questions/38983926/can-aws-cloudformation-call-the-aws-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!