#! /usr/bin/env ruby template "runShellScriptTemplate" do content do __dsl do schemaVersion "2.0" description "Run a shell script" mainSteps do |*| action "aws:runShellScript" name "runShellScript" inputs do commands __script(context.commands) end end end end end Command "My-RunShellScript" do account_ids [] include_template "runShellScriptTemplate", commands: "echo 1" end Command "My-RunShellScript-2" do account_ids [] content do __dsl do schemaVersion "2.0" description "Run a shell script" mainSteps do |*| action "aws:runShellScript" name "runShellScript" inputs do commands __script(<<-'EOS') #! /bin/bash echo 1 echo 2 echo 3 EOS end end end end end Command "My-RunShellScript-3" do account_ids [] content do __dsl do schemaVersion "2.0" description "Run a shell script" mainSteps do |*| action "aws:runShellScript" name "runShellScript" inputs do commands __script_file("script.sh") end end end end end