Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. $ec2->client->runInstances([
  2.             'ImageId' => 'ami-2d386654',
  3.             'MinCount' => 1,
  4.             'MaxCount' => 1,
  5.             'InstanceType' => $resource->calculate(),
  6.             'UserData' => base64_encode("#!/bin/bash \r\n echo ECS_CLUSTER=convertclustr >> /etc/ecs/ecs.config"),
  7.             'IamInstanceProfile' => [
  8.                 'Arn' => 'arn:aws:iam::717509710948:instance-profile/ecsInstanceRole'
  9.             ],
  10.             'KeyName' => 'amazon_ec2',
  11.             'BlockDeviceMappings' => [
  12.                 [
  13.                     'DeviceName' => '/dev/xvda',
  14.                     'Ebs' => [
  15.                         'DeleteOnTermination' => true,
  16.                         'VolumeSize' => 10 + $volumeSize + $reserveSize
  17.                     ],
  18.                 ],
  19.             ],
  20.         ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement