CloudFormationでProperty DeviceIndex cannot be empty.
のエラーが出る場合があります。
AWS CloudFormation デザイナーで吐かれた↓のようなyamlで再現。
...
EC2I3K8WP:
Type: 'AWS::EC2::Instance'
Properties:
ImageId: ami-bec974d8
NetworkInterfaces:
- SubnetId: !Ref PNSubNet1
...
対応
インスタンスにSubnetId
を紐付けたかったので以下のように修正。
...
EC2I3K8WP:
Type: 'AWS::EC2::Instance'
Properties:
ImageId: ami-bec974d8
SubnetId: !Ref PNSubNet1
...