Export existing AWS Lambda and API Gateway to Cloudformation template

ⅰ亾dé卋堺 提交于 2019-12-06 21:30:06

问题


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

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?


回答1:


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

and then

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.




回答2:


CloudFormer was built for this, however, I agree with @MaiKaY that you should rewrite everything. CloudFormer will create hard-links with IDs, where you have to replace these with references, add parameters and/or mappings. It can help you get started, so you know what you need in the template.



来源:https://stackoverflow.com/questions/50906085/export-existing-aws-lambda-and-api-gateway-to-cloudformation-template

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