Open arminc opened 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
@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
Another way to access EC2 is to use AWS SessionManager https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html.
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:
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