<p>Originally I wrote a nice answer about how to do it for IAM users, because I think it is the only way how you can use SSH public keys with CodeCommit. The key is uploaded to the IAM user profile and without an user you have nowhere to put the key.  For SSO I would suggest to consider the AWS credential helper <a href="https://docs.aws.amazon.com/cli/latest/reference/codecommit/credential-helper/index.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/cli/latest/reference/codecommit/credential-helper/index.html</a></p>
<p>SSO usually allows you to assume some kind of a role in AWS so using that role for accessing any AWS service is what you are expected to do.</p>
<p>If you really have to use SSH Keys and there is no other way, I would consider to utilize the fact that <code>git</code> is a fully distributed VCS system, that means that no repository is the &quot;main&quot; one from the <code>git</code> perspective. You can create a git repository on an EC2 instance. The instance will have an IAM role which will allow writing back to CodeCommit and you can synchronize these two via hooks.</p>

CC BY-SA 4.0
2022-02-07T23:44:41.903Z
2022-02-07T23:44:41.903Z
petrchpetr
<p>My AWS identity is SSO-managed, not an IAM user.</p>
<p>I wish to upload my public SSH key (so as enable client UI access to CodeCommit) but am not the AWS account/organisation admin so cannot see what the options are or even if this is possible?</p>
<p>If there are any AWS SSO admins out there I'd be grateful for input.</p>
<p>Thanks and kind regards, Andrew</p>

<amazon-web-services><git><ssh>
How do I configure my AWS SSO-managed user with my public SSH key?
Andrew Eells
# How do I configure my AWS SSO-managed user with my public SSH key?

(Asked by: username_0 on 2022-02-07)

My AWS identity is SSO-managed, not an IAM user.

I wish to upload my public SSH key (so as enable client UI access to CodeCommit) but am not the AWS account/organisation admin so cannot see what the options are or even if this is possible?

If there are any AWS SSO admins out there I'd be grateful for input.

Thanks and kind regards, Andrew

**Tags:** amazon-web-services, git, ssh


---

## 1 answers

### Answer by username_1 on 2022-02-07. Score: 0

Originally I wrote a nice answer about how to do it for IAM users, because I think it is the only way how you can use SSH public keys with CodeCommit. The key is uploaded to the IAM user profile and without an user you have nowhere to put the key. For SSO I would suggest to consider the AWS credential helper <https://docs.aws.amazon.com/cli/latest/reference/codecommit/credential-helper/index.html>

SSO usually allows you to assume some kind of a role in AWS so using that role for accessing any AWS service is what you are expected to do.

If you really have to use SSH Keys and there is no other way, I would consider to utilize the fact that `git` is a fully distributed VCS system, that means that no repository is the "main" one from the `git` perspective. You can create a git repository on an EC2 instance. The instance will have an IAM role which will allow writing back to CodeCommit and you can synchronize these two via hooks.


---

