将现有的AWS Lambda和API网关导出到Cloudformation模板 [英] Export existing AWS Lambda and API Gateway to Cloudformation template

本文介绍了将现有的AWS Lambda和API网关导出到Cloudformation模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将现有的已配置和经过测试的基础架构(包括AWS Lambda函数,API网关,ElastiCache集群,Cloudwatch规则)导出到Cloudformation模板?

How to export existing configured and tested infrastructure (including AWS Lambda functions, API Gateways, ElastiCache clusters, Cloudwatch rules) to Cloudformation template?

我了解Cloudformer工具,但它支持数量有限的AWS服务(Amazon VPC,DynamoDB等),并且不支持我们使用的某些服务。我可以使用哪种工具和方法来生成Cloudformation模板?

I know about Cloudformer tool, but it supports limited number of AWS services (Amazon VPC, DynamoDB, etc) and don't supports some of services which we use. Which tools and approaches can I use in my case for generating Cloudformation template?

推荐答案

部分解决方案:可以将Lambda函数导出到AWS SAM文件

Partial solution: there is ability to export Lambda function to AWS SAM file

然后

我们将获得YAML文件将Lambda函数描述为 AWS :: Serverless :: Function。但是,有几件事-我们无法通过这种方法导出Lambda别名。同样,这对API Gateway导出也没有帮助。

We will get YAML file which describes your Lambda function as 'AWS::Serverless::Function'. But there are few things - we can't export Lambda aliases with such approach. Also that doesn't help with API Gateway exporting.

这篇关于将现有的AWS Lambda和API网关导出到Cloudformation模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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