Cloud concept · Updated

Code Review - Code review is the examination of a proposed source change by someone other than its author to decide whether it is ready to merge.

In short

Code review evaluates a change for correctness, maintainability, security, and operational impact before it enters a shared branch. It catches issues that automated checks can miss, shares knowledge across the team, and records why a change was accepted.

Cloud Concepts Hub →

5 key aspects of Code Review

Effective code review combines focused proposals, qualified reviewers, automated evidence, and enforceable rules for what can merge.

01
Reviewable changes

Keep each proposal focused on one outcome and explain its intent, validation, and operational impact. Separate broad refactoring from behavior changes when practical so reviewers can see what actually changes.

02
Qualified, independent approval

Assign reviewers who understand the affected component and its dependencies. Use ownership rules where supported to request or require specialist review for sensitive paths, such as infrastructure definitions or database schema.

03
Enforced merge requirements

Protect important target branches against direct updates and require the appropriate approvals and automated checks. Configure how new commits affect prior approvals, and reserve bypass permissions for documented exceptions.

04
Automated validation

Run relevant builds, tests, and static checks on the proposed change. When integration risk is high, validate the result of combining the change with the current target branch rather than relying on tests of the source branch alone.

05
Conflict resolution and re-review

Resolve conflicts by preserving the intended behavior of both changes, not by blindly choosing one side. Rerun validation and re-review the changed portions, especially when the resolution modifies a public contract, data model, or deployment behavior.

What is Code Review

2 min read

Code review starts with the proposed behavior, not just the lines that changed. The author explains the problem, the scope of the change, and how it was validated. Reviewers inspect the diff and surrounding code, ask questions, and distinguish changes required for approval from optional suggestions. For example, if a service starts retrying failed writes, passing tests may show that retries work, but a reviewer should also ask whether a timeout followed by a retry could create a duplicate record.

In cloud repositories, teams usually conduct reviews through pull requests or merge requests. An author works on a branch, opens a request against the intended target branch, and updates the proposal in response to feedback. Short-lived branches generally keep diffs smaller and reduce the time changes have to diverge. Teams that maintain release branches should apply review controls to those branches as well as to the default branch, so that a backported fix is evaluated against the version that will actually ship.

Branch policies, branch protection rules, and repository rulesets make review requirements enforceable. On a protected branch, a team can require changes to come through a pull request, set a minimum number of independent approvals, and block merges until required build and test checks pass. Where supported, route changes in sensitive paths to designated reviewers and require renewed approval when the reviewed diff changes. If concurrent changes are common, validate against the current target branch or use a merge queue to test the proposed result before it lands. Keep bypass permissions narrow and audit their use.

A merge conflict calls for a technical decision, not just a clean Git operation. Update the working branch from the target, determine what both changes intended, resolve the conflict, and push the result for fresh validation. In a SQL database project, one branch might rename a column while another adds a view that references its old name. Preserving both contributions requires updating the view and checking dependent objects. Rebuild the database project and inspect the generated deployment plan against a representative existing schema: a clean build does not establish that publishing the change will preserve existing data. Ask reviewers to revisit the affected diff after the resolution.

Review adds waiting time, and more approvals do not necessarily make a change safer. A small, tested fix may need one qualified reviewer, while a change to production access or a destructive schema operation warrants specialist review and explicit recovery planning. Let automation handle repeatable checks such as formatting and compilation so people can focus on behavior and risk. A green pipeline is not a review, and an approved pull request is not a deployment authorization. Keep those decisions separate when production releases require their own controls.

Code Review exam questions

Real practice exam questions on Code Review, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DVA-C03

A payments company uses Amazon CodeGuru Reviewer on an existing Git repository to catch defects such as resource leaks. The company wants to keep those checks and add an AI-assisted review when a pull request is opened. The new review must evaluate the proposed changes against both the company-wide coding standards and the owning team's requirements, which are maintained as separate Markdown documents. A designated human reviewer must give final approval even when neither automated review reports a finding. Which solution meets these requirements?

Show answerCORRECT ANSWER

Keep CodeGuru Reviewer enabled. Send pull-request events from a repository webhook to Amazon API Gateway and AWS Lambda. Have Lambda submit the diff and both applicable standards documents to Amazon Bedrock and post the findings as pull-request comments. Require approval from a designated human reviewer in the branch protection rules.

CodeGuru Reviewer continues to provide its existing defect findings. The pull-request webhook initiates the Bedrock review, and including both documents lets the model evaluate both sets of requirements. Posting findings as comments does not substitute for the human approval enforced by branch protection.

Practice Code Review in a full exam

Questions on Code Review in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn Code Review in lessons

2 short lessons on Code Review in 1 certification course.

Open the lessons