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

0

Hello,

We want to let students create their own personal (private) CodeCommit Repos based on IdentityPool, we find it possible to create CodeCommit repos programmatically (https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codecommit/).

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.

Thanks

1 Answer
1

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
EXPERT
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