Skip to content

Instantly share code, notes, and snippets.

@adenot
Created September 3, 2013 01:43
Show Gist options
  • Select an option

  • Save adenot/6418844 to your computer and use it in GitHub Desktop.

Select an option

Save adenot/6418844 to your computer and use it in GitHub Desktop.
CloudFormation template validation using a proxy
<?php
include 'aws.phar';
use Aws\CloudFormation\CloudFormationClient;
$client = CloudFormationClient::factory(array(
'region' => 'ap-southeast-2',
'key' => '__redacted__',
'secret' => '__redacted __',
'curl.options' => array(
CURLOPT_PROXY => '__redacted__',
CURLOPT_PROXYPORT => 8080,
CURLOPT_PROXYUSERPWD => '__redacted:__redacted__',
CURLOPT_SSL_VERIFYPEER => FALSE
)
));
$result = $client->validateTemplate(array(
'TemplateBody' => file_get_contents('dev.template'),
));
var_dump($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment