arminc / terraform-ecs

AWS ECS terraform module
MIT License
807 stars 373 forks source link

AWS remote commands #1

Open arminc opened 7 years ago

arminc commented 7 years ago

Don't use SSH but use AWS remote commands to execute commands on the instances. This is more secure and beter audited. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ec2-run-command.html

denishonig commented 7 years ago

Hi! Could you, please, help me in the following question. I need to debug why my application does not start on EC2 instance in ECS (I use this repository for deploy infrastructure). What should I do better? For AWS remote commands I also should use SSH. I need to assign elastic ip, allow ssh in security groups, etc? Thanks

arminc commented 7 years ago

@denishonig You can create a bastion host and give it access to the EC2 nodes on port 22 that way you can tunnel the SSH connection from your bastion host to your EC2 node.

Your PC -> bastion -> EC2 node for ECS

dtphuc commented 4 years ago

Another way to access EC2 is to use AWS SessionManager https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html.

cognitiaclaeves commented 3 years ago

Another way to access EC2 is to use AWS SessionManager https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html.

This is the method that I prefer. It requires setting up AWS Systems Manager, which I've found a bit futsy, but which seems to be getting better: