Skip to content

Instantly share code, notes, and snippets.

@pragnesh
Forked from ddepaoli3/codecommit and ec2 role.md
Created November 3, 2020 06:23
Show Gist options
  • Save pragnesh/3fe91d58602610aec98afcfff4a2cc9a to your computer and use it in GitHub Desktop.
Save pragnesh/3fe91d58602610aec98afcfff4a2cc9a to your computer and use it in GitHub Desktop.
How to use codecommit with IAM role without using IAM user credential

CodeCommit and Role

Centos 7

  1. Add to EC2 CodeCommitReadOnly Role
  2. sudo yum install -y awscli
  3. sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
  4. sudo yum install -y libcurl
  5. git config --global credential.helper '!aws codecommit credential-helper $@'
  6. git config --global credential.UseHttpPath true
  7. git clone https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/codecommit-repo

Note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment