简体   繁体   English

如何从 SAm 项目创建 cloudformation 模板?

[英]How to create cloudformation template from SAm project?

I am trying to convert a SAM project to a cloudformation template in order to call我正在尝试将 SAM 项目转换为 cloudformation 模板以便调用

cloudformation.createStack() cloudformation.createStack()

to create multiple stacks when a lambda is invoked.在调用 lambda 时创建多个堆栈。 So far I can upload the SAM project with到目前为止,我可以上传 SAM 项目

sam build sam package山姆构建山姆包

But the size of the S3 is to big and I am getting errors.但是 S3 的尺寸太大了,我遇到了错误。 What are the steps to correctly upload the cloudformation template?正确上传cloudformation模板的步骤是什么?

These pre-reqs need to be met before continuing:在继续之前,需要满足这些先决条件:

  1. Install the SAM CLI.安装 SAM CLI。

  2. Create an Amazon S3 bucket to store the serverless code artifacts that the SAM template generates.创建一个 Amazon S3 存储桶来存储 SAM 模板生成的无服务器代码工件。 At a minimum, you will need permission to put objects into the bucket.至少,您需要获得将对象放入存储桶的权限。

  3. The permissions applied to your IAM identity must include iam:ListPolicies.应用于您的 IAM 身份的权限必须包括 iam:ListPolicies。

4.You must have AWS credentials configured either via the AWS CLI or in your shell's environment via the AWS_* environment variables. 4.您必须通过 AWS CLI 或通过 AWS_* 环境变量在您的 shell 环境中配置 AWS 凭证。

5.Git installed. 5.Git安装。

6.Python 3.x installed. 6.Python 3.x 已安装。 (Optional) Install Python's virtualenvwrapper. (可选)安装 Python 的 virtualenvwrapper。

Source Link:- https://www.packetmischief.ca/2020/12/30/converting-from-aws-sam-to-cloudformation/来源链接:- https://www.packetmischief.ca/2020/12/30/converting-from-aws-sam-to-cloudformation/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Cloudformation模板到SAM还是无服务器? - Cloudformation template to SAM or serverless? 如何使用 cloudformation/SAM 创建一个 SQS 队列,该队列与使用 SAM 创建的 lambda 一起使用? - How to create an SQS queue with cloudformation/SAM that works with lambdas created with SAM? 如何将无服务器应用程序 Model (SAM) 模板转换为 Cloudformation? - How to transform a Serverless Application Model (SAM) template to Cloudformation? 如何自定义AWS Codestar / Cloudformation模板以创建特定的代码构建项目? - How to customize AWS Codestar / Cloudformation template to create specific codebuild project? SAM模板和Cloudformation模板的区别 - Difference between SAM template and Cloudformation template 从 SAM 获取 Cloudformation 脚本 - Get Cloudformation script from SAM 如何为MySQL创建CloudFormation模板? - How to create a CloudFormation template for MySQL? AWS SAM/CloudFormation 模板 Lambda 删除保护 - AWS SAM/CloudFormation Template Lambda Delete Protection SAM Local的AWS Cloudformation模板参数 - AWS Cloudformation Template Parameters for SAM Local 如何从 cloudformation 模板在不同区域创建/部署 lambda function? - How to create/deploy a lambda function in different region from cloudformation template?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM