..
List of Useful AWS CLI Commands
Send folders to S3
aws s3 sync ~/Downloads/iosdeveloper/02-fundacao-ambiente/cdn/ s3://tiagoaguiar.co/phoenix/videos/
Send subfolders to S3 (or check w/ –dryrun)
aws s3 cp result2/ s3://tiagoaguiar.co/phoenix/ --recursive --dryrun
Restart Gunicorn on EC2
ps aux |grep gunicorn |grep <project_name> | awk '{ print $2 }' |xargs kill -HUP
Generate certificate from certbot
sudo certbot --nginx -d fenix.tiagoaguiar.co
Restart pm2 server
pm2 restart all
Check supervisor
sudo systemctl status supervisord
Send file to EC2 through SSH
$scp -i path/amazon.pem ~/Desktop/file.css ec2-user@xxxx.amazonaws.com:/tmp/
Download file from EC2
$scp -i path/amazon.pem ec2-user@xxxx.amazonaws.com:/tmp/file.css ~/Desktop/