Skip to content

Instantly share code, notes, and snippets.

@avoidik
Last active June 30, 2021 15:20
Show Gist options
  • Save avoidik/bd84da228c9d6019b543c42dafcf18a8 to your computer and use it in GitHub Desktop.
Save avoidik/bd84da228c9d6019b543c42dafcf18a8 to your computer and use it in GitHub Desktop.
AWS CodeBuild Agent on Ubuntu EC2
#cloud-config
package_update: true
package_upgrade: true
packages:
- curl
- ruby
runcmd:
- 'yum erase amazon-ssm-agent -y'
- 'yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm'
- 'systemctl reenable amazon-ssm-agent.service'
- 'systemctl restart amazon-ssm-agent.service'
- 'curl -sSL https://aws-codedeploy-eu-west-1.s3.eu-west-1.amazonaws.com/latest/install | ruby - auto'
- 'systemctl restart codedeploy-agent.service'
#cloud-config
package_update: true
package_upgrade: true
packages:
- curl
- ruby-full
runcmd:
- 'snap remove amazon-ssm-agent'
- 'curl -fsSLO https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb'
- 'dpkg -i amazon-ssm-agent.deb'
- 'rm -f amazon-ssm-agent.deb'
- 'systemctl reenable amazon-ssm-agent.service'
- 'systemctl restart amazon-ssm-agent.service'
- 'curl -sSL https://aws-codedeploy-eu-west-1.s3.eu-west-1.amazonaws.com/latest/install | ruby - auto'
- 'systemctl restart codedeploy-agent.service'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment