I know of git rebase but don't know if it can be used with AWS code commit? Or if there's any other method of removing a commit to revert back to before it was made and merged?
Simplest answer is to just revert the commit. AWS Code Commit is standard Git and will support everything Git allows you to do.
I.e. find commit hash:
git log -n1 commit 444c954e458cc446e2a7a1f2659adf71bdf55580 (HEAD -> my-branch, origin/my-branch)
Then do the revert:
git revert 444c954e458cc446e2a7a1f2659adf71bdf55580 git push
It'll revert your repo to whatever state it would be without that specific commit. Note that if you have other commits that modified the same files afterward, you will have a merge conflict and will have to fix them manually.