AWS CloudFormation可以调用AWS API吗? [英] Can AWS CloudFormation call the AWS API?

查看:112
本文介绍了AWS CloudFormation可以调用AWS API吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用CloudFormation创建我的AWS环境,其中一部分是设置Elastic Transcoder。不幸的是,似乎ET不是现有CloudFormation系统的一部分,但可以通过API调用来创建。有什么方法可以从CloudFormation调用API吗?

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?

推荐答案

您可以创建自定义资源,特别是可以创建 lambda支持的自定义资源。

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

通过这些函数,可以使用事件对象中传递的模板中的数据和预签名的s3 URL调用lambda函数。您需要执行任何工作,然后将JSON文档写入该预签名URL。 JSON文档描述了创建的资源。本文档包含用于创建的资源(用于更新和删除请求)的某种标识符,以及模板其余部分可能需要的有关资源的任何数据。

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.

这篇关于AWS CloudFormation可以调用AWS API吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆