Я развертываю стек, используя шаблон облачной информации, который создает EC2 с разделом cloud-init.При развертывании я получаю это сообщение об ошибке:
The following resource(s) failed to create: [EC2Instance]. .
The requested configuration is currently not supported. Please check the documentation for supported configurations.
Если я удаляю раздел «Метаданные», все работает, и создается EC2.Что-то может быть неправильно настроено в разделе метаданных, и я не могу понять, что это такое.
Я использую эту документацию в качестве справки -> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-init.html
AWSTemplateFormatVersion: 2010-09-09
Resources:
EC2Instance:
Type: 'AWS::EC2::Instance'
Metadata:
AWS::CloudFormation::Init:
configSets:
config:
- "config1"
- "config2"
config1:
commands:
test:
command: "echo \"hello from config 1\" > test.txt"
config2:
commands:
test:
command: "echo \"hello from config 2\" > test.txt"
Properties:
InstanceType: "t2.small"
ImageId: "ami-06b382aba6c5a4f2c"
SecurityGroupIds:
- "sg-123456"
SubnetId: "subnet-123456"
KeyName: "my-example-key"
Я ожидаюEC2 Экземпляр должен быть создан, но я получаю следующее сообщение об ошибке:
The requested configuration is currently not supported. Please check the documentation for supported configurations. (Service: AmazonEC2; Status Code: 400; Error Code: Unsupported; Request ID: --Redacted--)