How to create CodeCommit Repo for each user in an IdentityPool?



We want to let students create their own personal (private) CodeCommit Repos based on IdentityPool, we find it possible to create CodeCommit repos programmatically (

So, we ask how to create a CodeCommit repo for each student and be accessible only by the student who created it, like the GitHub website.


1 Answer

You can try these steps as basic overview:

  1. Create an Amazon Cognito Identity Pool and configure it to allow authenticated identities.

❓ This will allow you to obtain temporary AWS credentials for authenticated users (students in this case).

  1. Create an IAM role with the necessary permissions to create and manage CodeCommit repositories.

❓ This role will be assumed by the temporary credentials obtained from the Cognito Identity Pool.

  1. In the Cognito Identity Pool configuration, associate the IAM role created in the previous step with the authenticated identities.

  1. In your application code, use the AWS SDK to create a CodeCommit repository for each student.

Additional Steps for Step 4:

profile picture
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions