Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ec2->client->runInstances([
- 'ImageId' => 'ami-2d386654',
- 'MinCount' => 1,
- 'MaxCount' => 1,
- 'InstanceType' => $resource->calculate(),
- 'UserData' => base64_encode("#!/bin/bash \r\n echo ECS_CLUSTER=convertclustr >> /etc/ecs/ecs.config"),
- 'IamInstanceProfile' => [
- 'Arn' => 'arn:aws:iam::717509710948:instance-profile/ecsInstanceRole'
- ],
- 'KeyName' => 'amazon_ec2',
- 'BlockDeviceMappings' => [
- [
- 'DeviceName' => '/dev/xvda',
- 'Ebs' => [
- 'DeleteOnTermination' => true,
- 'VolumeSize' => 10 + $volumeSize + $reserveSize
- ],
- ],
- ],
- ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement