This message was deleted.
# aws
s
This message was deleted.
b
code:
Copy code
cluster.createAutoScalingGroup(`${ fullName }-002-sg`, {
    templateParameters: {
      minSize: 1,
      maxSize: 1,
      desiredCapacity: 1,
    },
    subnetIds: awsx.ec2.Vpc.getDefault().publicSubnetIds,
    launchConfigurationArgs: {
      imageId: 'ami-04fea96ede651e6f4',
      securityGroups: securityGroups,
      instanceType: 't3.medium',
      iamInstanceProfile: ec2InstanceProfile,
      keyName: 'sosafe_id_rsa',
    },
  });
Looks like I cannot path this user data to configuration (this code should notify cfn that instances was created):
Copy code
UserData:
        Fn::Base64: !Sub |
          #!/bin/bash -xe
          echo ECS_CLUSTER=${ECSCluster} >> /etc/ecs/ecs.config
          yum install -y aws-cfn-bootstrap
          /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource ECSAutoScalingGroup --region ${AWS::Region}