Skip to content

Instantly share code, notes, and snippets.

@bendubuisson
Created May 30, 2019 22:28
Show Gist options
  • Save bendubuisson/349cd0646fe12473981c2bcd0904887e to your computer and use it in GitHub Desktop.
Save bendubuisson/349cd0646fe12473981c2bcd0904887e to your computer and use it in GitHub Desktop.
$client = new EcsClient([
'version' => 'latest',
'region' => 'ap-southeast-2'
]);
$client->runTask([
'cluster' => self::CONFIG[$environment]['cluster'],
'launchType' => 'FARGATE',
'count' => 1,
'taskDefinition' => self::CONFIG[$environment]['taskDefinition'],
'networkConfiguration' => [
'awsvpcConfiguration' => [
'assignPublicIp' => 'ENABLED',
'securityGroups' => self::CONFIG[$environment]['securityGroups'],
'subnets' => self::CONFIG[$environment]['subnets']
],
],
'startedBy' => $event->info
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment