gpt4 book ai didi

aws-cloudformation - 是否可以使用云形成在尚未过时的 EC2 镜像上部署 Cloud9 ide?

转载 作者:行者123 更新时间:2023-12-03 07:15:01 26 4
gpt4 key购买 nike

显然,开箱即用的 Cloud9 是在一个基本上过时的 EC2 实例上发布的,因为它没有当前、最近或可行的 aws cli 实例。

$ aws --version
aws-cli/1.19.112 Python/2.7.18 Linux/4.14.296-222.539.amzn2.x86_64 botocore/1.20.112

据我所知,亚马逊建议使用版本 2.9.1;但即使最新的系列 1 版本也是 1.27.19

有没有办法使用 CloudFormation 在更现代的 EC2 实例上部署 Cloud9?我想将 Cloud9 推广到开发组织,但令我痛苦的是,它的部署似乎很糟糕(是的,我需要使用更新的 cli 选项来对每个新 IDE 进行初始配置)。

最佳答案

您是否尝试过使用亚马逊系统镜像 (AMI) 的标识符?

That's used to create the EC2 instance, because to declare this entity in your AWS CloudFormation template need use this syntax in your JSON file:

{
"Type" : "AWS::Cloud9::EnvironmentEC2",
"Properties" : {
"AutomaticStopTimeMinutes" : Integer,
"ConnectionType" : String,
"Description" : String,
"ImageId" : String,
"InstanceType" : String,
"Name" : String,
"OwnerArn" : String,
"Repositories" : [ Repository, ... ],
"SubnetId" : String,
"Tags" : [ Tag, ... ]
}
}

然后,要为实例选择 AMI,您必须指定有效的“AMI 别名”或有效的 AWS Systems Manager 路径,如果满足以下条件,则使用默认 AMI该参数未在请求中显式分配值。

查看AWS Cloud9 environment EC2中的整个过程.

AMI aliases

  • Amazon Linux(默认):amazonlinux-1-x86_64
  • 亚马逊 Linux 2:amazonlinux-2-x86_64
  • Ubuntu 18.04:ubuntu-18.04-x86_64

SSM paths

  • Amazon Linux(默认):resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64
  • Amazon Linux 2:解析:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
  • Ubuntu 18.04:解析:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64

关于aws-cloudformation - 是否可以使用云形成在尚未过时的 EC2 镜像上部署 Cloud9 ide?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74579611/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com