Skip to content

Instantly share code, notes, and snippets.

@austoonz
Created February 6, 2019 17:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austoonz/57158f154a6a963b991606e111fd3b84 to your computer and use it in GitHub Desktop.
Save austoonz/57158f154a6a963b991606e111fd3b84 to your computer and use it in GitHub Desktop.
A CloudFormation template to create a PowerShell based AWS Systems Manager Association with inline PowerShell.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: "Systems Manager Association"
Resources:
Association:
Type: AWS::SSM::Association
Properties:
AssociationName: AssociationName
Name: AWS-RunPowerShellScript
Parameters:
commands:
- |
Write-Host 'This is some embedded PowerShell!'
executionTimeout:
- '300'
ScheduleExpression: 'rate(1 day)'
Targets:
- Key: 'tag:Service'
Values:
- 'ServiceName'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment