OPS05-BP07 Implement practices to improve code quality - AWS Well-Architected Framework (2022-03-31)

OPS05-BP07 Implement practices to improve code quality

Implement practices to improve code quality and minimize defects. Some examples include test-driven development, code reviews, and standards adoption.

On AWS, you can integrate services such as Amazon CodeGuru with your pipeline to automatically identify potential code and security issues using program analysis and machine learning. CodeGuru provides recommendations on how to implement the AWS best practices to address these issues.

Common anti-patterns:

  • To be able to test your feature sooner, you have decided to not integrate your standard input sanitization library. After testing, you commit your code without remembering to complete incorporation of the library.

  • You have minimal experience with the dataset you are processing and are unaware that there are a series of edge cases that can exist in your dataset. Those edge cases are not compatible with the code that you have implemented.

Benefits of establishing this best practice: By adopting practices to improve code quality, you can help minimize issues introduced to production.

Level of risk exposed if this best practice is not established: Medium

Implementation guidance

  • Implement practices to improve code quality: Implement practices to improve code quality to minimize defects and the risk of their being deployed. For example, test-driven development, pair programming, code reviews, and standards adoption.

Resources

Related documents: