可以使用AWS SDK for PHP 3.x調用createStack() command:
$result = $client->createStack([
'Capabilities' => ['<string>', ...],
'ClientRequestToken' => '<string>',
'DisableRollback' => true || false,
'NotificationARNs' => ['<string>', ...],
'OnFailure' => 'DO_NOTHING|ROLLBACK|DELETE',
'Parameters' => [
[
'ParameterKey' => '<string>',
'ParameterValue' => '<string>',
'UsePreviousValue' => true || false,
],
// ...
],
'ResourceTypes' => ['<string>', ...],
'RoleARN' => '<string>',
'StackName' => '<string>', // REQUIRED
'StackPolicyBody' => '<string>',
'StackPolicyURL' => '<string>',
'Tags' => [
[
'Key' => '<string>',
'Value' => '<string>',
],
// ...
],
'TemplateBody' => '<string>',
'TemplateURL' => '<string>',
'TimeoutInMinutes' => <integer>,
]);