fbpx

Create an ECS Ocean Launch Spec with the following CF template

The full body attributes list is available on our main creation page

Request - JSON example

Body
Copied!
Downloaded!
{
  "Resources": {
    "SpotinstOcean": {
      "Type": "Custom::oceanEcsLaunchSpec",
      "Properties": {
        "ServiceToken": {
          "Fn::Sub": "arn:aws:lambda:${Region}:178579023202:function:spotinst-cloudformation"
        },
        "accessToken": "Spotinst Token",
        "accountId": "act-1234",
        "oceanLaunchSpec": {
          "oceanId": "o-12345",
          "imageId": "ami-1234",
          "name": "Test launch config",
          "userData": "",
          "securityGroupIds": [
            "sg-1234"
          ],
          "iamInstanceProfile": {
            "arn": "Instance Profile ARN"
          },
          "attributes": [
            {
              "key": "Description",
              "value": "Test Launch config For Ocean Ecs"
            }
          ]
        }
      }
    }
  }
}
Request - YML example

Body
Copied!
Downloaded!
Resources:
  SpotinstOcean:
    Type: Custom::oceanEcsLaunchSpec
    Properties:
      ServiceToken: 
        Fn::Sub: arn:aws:lambda:${Region}:178579023202:function:spotinst-cloudformation
      accessToken: !Ref AccessToken
      accountId: "act-1234"
      oceanLaunchSpec:
        oceanId: 'o-12345'
        imageId: 'ami-1234'
        name: "Test launch config"
        userData: ''
        securityGroupIds:
        - sg-1234
        iamInstanceProfile:
          arn: 
        attributes:
        - key: 'Description'
          value: 'Test Launch config For Ocean Ecs'