Reputation: 1868
I'm trying to ssh to my docker container in Elastic Beanstalk via awsebcli
. But it always complains Access Denied by the following command:
eb init --profile default1 Microservices-Docker --debug
The debug info is listed below:
2017-04-06 10:15:29,724 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, describe_configuration_settings) to region: eu-west-1 with args:{'ApplicationName': 'Microservices-Docker', 'EnvironmentName': 'customer-track-test'}
2017-04-06 10:03:41,541 (DEBUG) ebcli.lib.aws : Response: {'ResponseMetadata':
{'date': 'Thu, 06 Apr 2017 06:03:41 GMT', 'RetryAttempts': 0,
'HTTPStatusCode': 403, 'RequestId': 'c8bce47d-1a8e-1117-92b2-b348ebce885e'},
'Error': {'Message': 'Access Denied', 'Code':
'InsufficientPrivilegesException', 'Type': 'Sender'}}
2017-04-06 10:03:41,541 (DEBUG) ebcli.lib.aws : API call finished, status = 403
2017-04-06 10:03:41,541 (DEBUG) ebcli.lib.aws : Received a 403
NotAuthorizedError: Operation Denied. Access Denied
I add full access policy to Elastic Beanstalk to my current user, what could possibly cause that error, any suggestions? Thanks!
Upvotes: 1
Views: 598
Reputation: 6765
eb init does not ssh into a docker container, it initializes an elastic beanstalk configuration within the current directory you are working on. You probably don't have the privileges to do that in your current location, try a directory you have full control over. See more in the documentation - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cmd-commands.html#eb3-cmd-options
In order to ssh into the docker container you must first ssh into the EC2 instance running your container using eb ssh
(or any other method), and then ssh into the docker container running there using docker exec
or docker attach
-- EDIT --
Reading through your errors again I see the error does originate from AWS. Are you sure your CLI is configured to use the user you set the policies for? You can check that by looking at the access key configured in ~/.aws/configure
Upvotes: 1