In this article you will how to secure the CodeCommit repository branches. As a best practice repository's
master branch should be restricted to push code direclty into it.
To push any code into
master, a developer must open a Pull Request, this PR must be reviewed by some other engineer and the it must be pushed into master branch..Read more