【问题标题】:How to create cloudformation template from SAm project?如何从 SAm 项目创建 cloudformation 模板?
【发布时间】:2021-11-03 11:16:44
【问题描述】:

我正在尝试将 SAM 项目转换为 cloudformation 模板以便调用

cloudformation.createStack()

在调用 lambda 时创建多个堆栈。到目前为止,我可以使用

上传SAM项目

山姆构建 山姆包

但是 S3 的尺寸太大了,我遇到了错误。正确上传cloudformation模板的步骤是什么?

【问题讨论】:

    标签: amazon-web-services aws-lambda aws-sam


    【解决方案1】:

    在继续之前需要满足这些先决条件:

    1. 安装 SAM CLI。

    2. 创建一个 Amazon S3 存储桶来存储 SAM 模板生成的无服务器代码工件。至少,您需要获得将对象放入存储桶的权限。

    3. 应用于您的 IAM 身份的权限必须包括 iam:ListPolicies。

    4.您必须通过 AWS CLI 或在您的 shell 环境中通过 AWS_* 环境变量配置 AWS 凭证。

    5.Git 已安装。

    6.Python 3.x 已安装。 (可选)安装 Python 的 virtualenvwrapper。

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

    【讨论】:

    • 我正在使用nodejs
    猜你喜欢
    • 2018-10-12
    • 2021-12-08
    • 2018-04-15
    • 1970-01-01
    • 2014-08-02
    • 1970-01-01
    • 2021-09-05
    • 1970-01-01
    • 2021-07-01
    相关资源
    最近更新 更多