在Cloudformation中使用CreditSpecification创建t2实例

use*_*561 2 yaml amazon-ec2 amazon-web-services aws-cloudformation

我正在尝试使用CloudFormation中的t2无限突发cpu选项启动一个AWS EC2实例:

AWSTemplateFormatVersion: 2010-09-09
Resources:
  EC2I1U4EQ:
    Type: 'AWS::EC2::Instance'
    Properties:
      ImageId: ami-403e2524
      InstanceType: t2.small
      CreditSpecification:
        - CpuCredits: unlimited
Run Code Online (Sandbox Code Playgroud)

但是在创建过程中出现错误:

财产的价值CreditSpecification必须是一个对象

我找不到任何有关如何形成CreditSpecification yaml语句的示例。

任何建议欢迎。

Lau*_*ard 5

根据文档,是- CPUCredits: unlimited,您缺少2个大写字母