Skip to content

Latest commit

 

History

History

aws-fargate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

docker-ssh-aws-fargate

A Docker image that allows connecting to an AWS Fargate managed container through SSH. User authentication is done by a public and private key pair; containers receive the public key as an environment variable.

pipeline status

This is the reference image used to demonstrate the work described in 9 steps to SSH into an AWS Fargate managed container: leverage Public-key cryptography to establish secure connections.

Requirements

This solution is compliant with AWS security standards and makes use of a few products:

  1. Amazon Elastic Container Registry
  2. AWS Systems Manager Parameter Store (optional)
  3. Amazon ECS Task Definitions
  4. AWS Fargate

General instructions

  1. Build an SSH-enabled Docker image from this repository
  2. Push the image to Amazon Elastic Container Registry (ECR)
  3. Create an SSH public and private key pair
  4. Store the public key in AWS Systems Manager Parameter Store (optional)
  5. Create a Task Definition
  6. Grant Task Execution IAM Role read access to the parameter (optional)
  7. Run a Fargate Task using the definition
  8. Get Task's IP address
  9. Open an SSH connection to the Task Container, providing the private key generated in step 3