gpt4 book ai didi

amazon-web-services - 云信息错误:Invalid availability zone: [ap-southeast-2] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue

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

我查询了 imageid 并在 cloudformation 模板中使用了它,但它似乎失败了,并显示“无效的可用区:[ap-southeast-2](服务:AmazonEC2;状态代码:400;错误代码:InvalidParameterValue ; 请求 ID: 92ae3703-c957-4cb2-8bc3-84a48d3e02d4; 代理: null)"

aws ssm get-parameters --names /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 --region ap-southeast-2
{
"InvalidParameters": [],
"Parameters": [
{
"Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2",
"DataType": "text",
"LastModifiedDate": 1630616391.045,
"Value": "ami-0210560cedcb09f07",
"Version": 51,
"Type": "String",
"ARN": "arn:aws:ssm:ap-southeast-2::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
}
]

这个失败了

Resources:
Instance:
Type: 'AWS::EC2::Instance'
Properties:
AvailabilityZone: ap-southeast-2
ImageId: ami-0210560cedcb09f07
InstanceType: t2.micro

但是下面这个似乎有效

# Use public Systems Manager Parameter
Parameters:
LatestAmiId:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'

Resources:
Instance:
Type: 'AWS::EC2::Instance'
Properties:
ImageId: !Ref LatestAmiId
InstanceType: t2.micro

最佳答案

ap-southeast-2 是区域名称。可用区以 ab、c` 结尾。所以你应该有,例如:

AvailabilityZone: ap-southeast-2a

关于amazon-web-services - 云信息错误:Invalid availability zone: [ap-southeast-2] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69413559/

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