Skip to content

Instantly share code, notes, and snippets.

@paulogesualdo
Last active December 30, 2022 18:03
Show Gist options
  • Save paulogesualdo/df5969e08754568ca67f2be04ebdaaa9 to your computer and use it in GitHub Desktop.
Save paulogesualdo/df5969e08754568ca67f2be04ebdaaa9 to your computer and use it in GitHub Desktop.
Shell script to install the AWS CodeDeploy agent on an Amazon Linux 2 EC2 instance na região us-east-1
#!/bin/bash
sudo yum update
sudo yum install ruby -y
sudo yum install wget
CODEDEPLOY_BIN="/opt/codedeploy-agent/bin/codedeploy-agent"
$CODEDEPLOY_BIN stop
sudo yum erase codedeploy-agent -y
cd /home/ec2-user
#Executar comando semelhante ao abaixo, mudar a região caso necessário:
wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
sudo service codedeploy-agent status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment