Created
June 15, 2021 02:41
-
-
Save freedomfury/c87929337a7c4bbcad0dd79d0b39ff30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "updateOSSoftware", | |
| "action": "aws:runCommand", | |
| "maxAttempts": 3, | |
| "timeoutSeconds": 3600, | |
| "onFailure": "Abort", | |
| "inputs": { | |
| "DocumentName": "AWS-RunShellScript", | |
| "InstanceIds": [ | |
| "{{startInstances.InstanceIds}}" | |
| ], | |
| "Parameters": { | |
| "commands": [ | |
| "export https_proxy=http://myproxy.com:myport", | |
| "export https_proxy='{{OutBoundProxy}}'", | |
| "set -e", | |
| "[ -x \"$(which wget)\" ] && get_contents='wget $1 -O -'", | |
| "[ -x \"$(which curl)\" ] && get_contents='curl -s -f $1'", | |
| "eval $get_contents https://aws-ssm-downloads-eu-west-1.s3.amazonaws.com/scripts/aws-update-linux-instance > /tmp/aws-update-linux-instance", | |
| "chmod +x /tmp/aws-update-linux-instance", | |
| "/tmp/aws-update-linux-instance --pre-update-script '{{PreUpdateScript}}' --post-update-script '{{PostUpdateScript}}' --include-packages '{{IncludePackages}}' --exclude-packages '{{ExcludePackages}}' 2>&1 | tee /tmp/aws-update-linux-instance.log" | |
| ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment