Skip to content

Instantly share code, notes, and snippets.

@DALDEI
Last active October 29, 2015 14:59
Show Gist options
  • Save DALDEI/9ad24a6fad7054c7f3d5 to your computer and use it in GitHub Desktop.
Save DALDEI/9ad24a6fad7054c7f3d5 to your computer and use it in GitHub Desktop.
AWS-CLI Cloud Formation Validation
#!/bin/sh
#############################################################################
## Usage: cfvalidate file.template [ file ...]
##############################################################################
## Convenience wrapper script for aws cli 'cloudformation validate-template'
## which requires a inline, file URL or S3 url for templates to validate
## This script takes simple, absolute or relative filenames and validate them
## using the AWS API
## https://aws.amazon.com/cli/
##
## Requires that the AWS CLI is in your path and the default profile configured
##
[ $# -gt 0 ] || { echo "Usage: $0 template-file [file ...]"; exit 1 ; }
for f ; do
echo $f
aws cloudformation validate-template --template-body file://$f || echo Failed $f
done
@DALDEI
Copy link
Author

DALDEI commented Oct 29, 2015

Added screenshots of Oxygen External Tool configuration dialog and how it looks when the tool is added.
Something this simple could be inserted inline into Oxygen without the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment