I am deploying a Flask application to ElasticBeanstalk. One of the dependencies of this application is a package that should be installed from a CodeCommit git repository.
Locally, I have successfully set up SSH to connect to the CodeCommit repo to pip install
and push code. I have added the package to requirements.txt
, and locally this installs fine with pip
.
The question is, how should I configure EBS to have SSH access to this repo?
I see the IAM role used by EBS is aws-elasticbeanstalk-ec2-role
. I attached the AWSCodeCommitReadOnly
policy to this role, but to no avail.
In the eb-activity.log
it gives an SSH error when trying to get the package from CodeCommit:
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
How should I configure access to AWS CodeCommit from EBS?