Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS CloudFormation call the AWS 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?

like image 218
Dugan Avatar asked Aug 16 '16 20:08

Dugan


People also ask

What does AWS CloudFormation do?

AWS CloudFormation is a service that gives developers and businesses an easy way to create a collection of related AWS and third-party resources, and provision and manage them in an orderly and predictable fashion.

Can CloudFormation run a script?

For those learning AWS/AWS CLI, CloudFormation is a tool for building infrastructure with AWS. Here is a very simple document on how to use CloudFormation to build an AWS EC2 Linux instance and execute a bash script from CloudFormation against the newly created Linux instance.

Can CloudFormation interact with Lambda?

All in all, CloudFormation makes deploying AWS Lambda functions incredibly simple. Start by creating the template file that will define your resources. This will be your working folder for your code. Next, create your function in the appropriate file for your desired Lambda runtime.


1 Answers

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.

like image 129
Frederick Cheung Avatar answered Sep 21 '22 06:09

Frederick Cheung