skip to Main Content

I’d like to associate an SSH public key to my current user which I created from IAM Identity Center so that I can use it for AWS Code Commit.

I am the admin and root.

2

Answers


  1. Select the ‘Security Credentials’ tab -> Locate the SSH public key for AWS CodeCommit -> Click on ‘Upload Public Key’ in the upper-right corner -> Upload the previously generated public key content.
    or
    https://zhuanlan.zhihu.com/p/661505720

    Login or Signup to reply.
  2. You can’t, that option is not available for IAM Identity Center users. There’s no option for that. Access to CodeCommit is managed via policy in your permission sets.

    … the user’s access is controlled with federated login via AWS SSO. You can grant that access using AWS native authentication, which eliminates the need for a Git credential helper, SSH, and GPG keys. In addition, this allows the administrator to control access by adding or removing the user’s IAM role access.

    https://aws.amazon.com/blogs/devops/federated-multi-account-access-for-aws-codecommit/

    You can add CodeCommit policy to your user’s permission set or you can create a separate permission set with just CodeCommit policy.

    This is how it would look like if you create a separate permission set for it and having multiple permission set for a user.
    enter image description here

    After setting up the permission, you need to use git-remote-codecommit. You can install it using Python pip.

    pip install git-remote-codecommit
    

    Once you login to your SSO via CLI or by exporting the temporary credentials from SSO portal, you can access your repository by:

    git clone codecommit::{aws-region}://MyAwesomeRepository 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search