awslabs / sandbox-accounts-for-events

"Sandbox Accounts for Events" allows to provide multiple, temporary AWS accounts to a number of authenticated users simultaneously via a browser-based GUI.
Apache License 2.0
172 stars 37 forks source link

fix codecommit deprecation with github #66

Closed diranetafen closed 1 month ago

diranetafen commented 2 months ago

Issue #62

Description of changes: After the deprecation of the codecommit service by AWS, sandbox-accounts-for-events accounts can no longer be used. So in this pull request we are changing the SCM from codecommit to github (the recommended alternative). Major changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

diranetafen commented 2 months ago

cc @moellr & @mavogel

BhuviTheDataGuy commented 2 months ago

I tried this and noticed 2 items.

When I want to create the repo using my own username, it's not working and im getting

You are not allowed to create a repository under GitHub user or organization

And then I changed the username to my org user name, then it worked.

The other thing is, it's creating a public repo instead of the private repo.

diranetafen commented 2 months ago

Hello @BhuviTheDataGuy First of all thanks for the review, very appreciate it : 1- the username is working fine because i use it : diranetafen in my case, use the username unique id not the full name (TAFEN Dirane ) 2- i update the default repo visibility to private (change repo visibility) Let me know if you have any other observation

BhuviTheDataGuy commented 2 months ago

Thanks for the quick fix.

1 - I have given my username only(not sure why it was not working, I'll try one more time)

Another issue - 1st time I created a github token and did the

make build bucket=BUCKET github_token=TOKEN 

While deploying I was getting errors, so I though to create the token again.

Then I deleted the old token and created a new one.

Again I did the

make build  bucket=BUCKET github_token=NEW_TOKEN 

But the secret manager still holds the older token, I had to manually update the token.

diranetafen commented 2 months ago

thanks @BhuviTheDataGuy i add secret deletion in "make delete" macro

moellr commented 1 month ago

Great suggestion, but I will not merge it into main. Reason: I'd like to keep external dependencies limited and try to avoid the requirement of having an external repository provider to be able to deploy the solution. Therefore I have refactored the solution to use CodeBuild as build provider, which allows to remove CodeCommit and use Amplify only as hosting provider from S3 artifacts. The refactored version has just been committed to the repo.

straa007 commented 1 month ago

I am sorry this was not accepted, the github pattern both a lines with AWS best practice post code commit and improves maintainability of the running soluiont.