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.
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.
This solution is compliant with AWS security standards and makes use of a few products:
- Amazon Elastic Container Registry
- AWS Systems Manager Parameter Store (optional)
- Amazon ECS Task Definitions
- AWS Fargate
- Build an SSH-enabled Docker image from this repository
- Push the image to Amazon Elastic Container Registry (ECR)
- Create an SSH public and private key pair
- Store the public key in AWS Systems Manager Parameter Store (optional)
- Create a Task Definition
- Grant Task Execution IAM Role read access to the parameter (optional)
- Run a Fargate Task using the definition
- Get Task's IP address
- Open an SSH connection to the Task Container, providing the private key generated in step 3