#! /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 runCommand __script(context.commands) TimeoutSeconds 10 end end end end end Command "Test-Example-RunShellScript" do account_ids [] include_template "runShellScriptTemplate", commands: "echo example >> /tmp/result.txt" 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 runCommand __script(<<-'EOS') #! /bin/bash echo 1 >> /tmp/results.txt echo 2 >> /tmp/results.txt exit 1 EOS TimeoutSeconds 10 end end end end end