How do I enable SSH for my AWS-EB instance?

前端 未结 2 1365
时光说笑
时光说笑 2021-01-15 17:41

I have a working AWS Elastic Beanstalk instance with an attached RDS database and want to enable SSH from my development machine. What\'s the best way to do that? Specifical

相关标签:
2条回答
  • 2021-01-15 18:00

    Using the EB CLI to do eb ssh --setup is the most straightforward way. But it will require you to have permissions to pass roles, and access ec2 security groups.

    In order to add ssh to any environment, all you need to do is assign an ssh keypair to the environment. If you already have an ec2 keypair setup, then you can make this assignment using the Elastic Beanstalk Web console. Otherwise, you will have to create a keypair first.

    0 讨论(0)
  • 2021-01-15 18:03

    To add ssh to your EB instances, first make sure you know which policy it currently uses. In your EB web console, go to the environment and then Configuration and then Instances. You'll see the Instance profile name there.
    Now go to the your IAM console and locate that role. Here's the policy I have there, which allows me to add SSH to the environment:
    { "Version": "2015-01-14", "Statement": [ { "Action": [ "autoscaling:Describe*", "cloudwatch:*" ], "Effect": "Allow", "Resource": "*" } ] }

    0 讨论(0)
提交回复
热议问题