Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Source: https://gist.github.com/f5eec475f2b72895be7a5dee4e761c02
###############################
# Amazon Lightsail Containers #
###############################
# Referenced videos:
# - Copilot - What AWS ECS and Fargate Container Management Should Have Been All Along: https://youtu.be/YCCFK2RRm7U
# - Amazon Lambda Containers - How to Package and Deploy AWS Functions as Container Images: https://youtu.be/DsQbBVr-GwU
#########
# Setup #
#########
# Requirements:
# - AWS account (https://aws.amazon.com/)
# - `aws` CLI (https://aws.amazon.com/cli/)
# - AWS config or env. vars with access keys and the default region
# ... or ...
# - Gitpod with the Chrome extension (https://youtu.be/QV1fYt-7SLU)
# - Environment variables *AWS_ACCESS_KEY_ID*, *AWS_SECRET_ACCESS_KEY*, and *AWS_DEFAULT_REGION* (https://gitpod.io/settings/)
# Open https://github.com/vfarcic/lightsail-containers-demo
# Clone the repo or click the *Gitpod* button
#############################################
# Deploying containers from the Web Console #
#############################################
# AWS Console: https://console.aws.amazon.com/
# Image (first release): vfarcic/devops-toolkit-series:2.7.0
# Image (second release): vfarcic/devops-toolkit-series:2.9.18
######################################
# Deploying containers using the CLI #
######################################
aws lightsail help
aws lightsail \
create-container-service \
--service-name devops-toolkit \
--power micro \
--scale 1 \
--output yaml
aws lightsail \
get-container-services \
--output yaml
aws lightsail \
create-container-service-deployment \
--generate-cli-skeleton yaml-input
cat devops-toolkit-2.7.0.yaml
aws lightsail \
create-container-service-deployment \
--cli-input-yaml file://devops-toolkit-2.7.0.yaml \
--output yaml
aws lightsail \
get-container-services \
--output yaml
aws lightsail delete-container-service \
--service devops-toolkit \
--output yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment