Skip to content

Instantly share code, notes, and snippets.

View aws-scripting-guy's full-sized avatar

AWS Scripting Guy aws-scripting-guy

View GitHub Profile
@aws-scripting-guy
aws-scripting-guy / array_as_param.ps1
Created March 6, 2016 21:55
powershell script - array as param
Param(
[array]$region = @( "eu-west-1")
)
foreach ($item in $region) {
echo $item
}
#PS> .\array_as_param.ps1 us-east-1,eu-west-1
@aws-scripting-guy
aws-scripting-guy / aws-cli_file _uri _descriptor.ps1
Created March 4, 2016 23:39
aws cli file:// URI descriptor - call parent directory
# PowerShell
$regions = "eu-west-1"
foreach ($region in $regions) {
aws cloudformation create-stack `
--parameters file://$PWD\..\templates\stack_parameters.json `
--tags file://$PWD\..\templates\stack_tags.json `
--stack-policy-body file://$PWD\..\templates\stack_policy.json `
--template-body file://$PWD\..\templates\log_bucket_template.json `
@aws-scripting-guy
aws-scripting-guy / tasks.json
Last active May 28, 2018 12:38
CloudFormation template validation in Visual Studio Code
// requirements
// aws cli has to be installed
// working AWS credentials file ~/.aws/credentials
// copy this file as tasks.json under the .vscode directory in your templates project directory
// open your CloudFormation template and hit Ctrl + Shift + B
{
"version": "0.1.0",
"command": "aws",
"isShellCommand": true,