AWS

My User Data Recipe for an AWS EC2 Instance launched with Docker

I’m using an Ubuntu server instance on EC2 and run the below script as user data on initial launch . . . .

I need to manually update the Docker compose URL/version in the script below – – Still need to figure out how to automate that.

User Data to launch Ubuntu instance with Docker installed

#!/bin/bash
# Install docker
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
apt-get update
apt-get install -y docker-ce
usermod -aG docker ubuntu

# Install docker-compose
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

# READ MORE: https://docs.docker.com/install/linux/docker-ce/ubuntu/
# To check: grep "cloud-init\[" /var/log/syslog
#       OR: less /var/log/cloud-init-output.log

# Manually add user to docker group
# sudo usermod -aG docker $USER

Read more →

AWS SysOps End Of Class Reference and Links

Resources for Module 1

ARTICLES/DOCS

Resources for Module 2a

ARTICLES/DOCS

VIDEOS

Resources for Module 2b

ARTICLES/DOCS

Resources for Module 3

ARTICLES/DOCS

VIDEOS

Resources for Module 4

ARTICLES/DOCS

Resources for Module 5

ARTICLES/DOCS

Resources for Module 6a

ARTICLES/DOCS

Resources for Module 6b

ARTICLES/DOCS

VIDEOS

Resources for Module 7

ARTICLES/DOCS

Resources for Module 8

ARTICLES/DOCS

Resources for Module 9

ARTICLES/DOCS

Resources for Module 10a

ARTICLES/DOCS

Resources for Module 10b

ARTICLES/DOCS

Resources for Module 11

ARTICLES/DOCS

VIDEOS

Resources for Module 12

ARTICLES/DOCS

Read more →

AWS – Architecture Exam Study Resources

These are links to AWS white papers and YouTube videos that I share with my students for deeper reference as they are getting ready for the AWS Solutions Architect Associate and Professional Exams.

AWS Architecture Videos

Transit Gateways from re:Invent
Read more →