Book Image

Implementing Cloud Design Patterns for AWS - Second Edition

By : Sean Keery, Clive Harber, Marcus Young
Book Image

Implementing Cloud Design Patterns for AWS - Second Edition

By: Sean Keery, Clive Harber, Marcus Young

Overview of this book

Whether you're just getting your feet wet in cloud infrastructure or already creating complex systems, this book will guide you through using the patterns to fit your system needs. Starting with patterns that cover basic processes such as source control and infrastructure-as-code, the book goes on to introduce cloud security practices. You'll then cover patterns of availability and scalability and get acquainted with the ephemeral nature of cloud environments. You'll also explore advanced DevOps patterns in operations and maintenance, before focusing on virtualization patterns such as containerization and serverless computing. In the final leg of your journey, this book will delve into data persistence and visualization patterns. You'll get to grips with architectures for processing static and dynamic data, as well as practices for managing streaming data. By the end of this book, you will be able to design applications that are tolerant of underlying hardware failures, resilient against an unexpected influx of data, and easy to manage and replicate.
Table of Contents (20 chapters)
Title Page
Dedication
About Packt
Contributors
Preface
Free Chapter
1
Introduction to Amazon Web Services
Index

Testing your code


Best practices for software development include testing your code. We have been testing whether Terraform is delivering the required outputs by validating that our resources exist in the AWS console. The automation of tests gives us a repeatable way to confirm that our product is behaving in the expected way. However, it is important to test non-functional requirements as well. Product security and availability are two aspects that affect every task. In addition to reducing toil through continuous builds and deployment of our code, we must ensure code quality. To this effect, we will create another CodeBuild project using the open source Sonar (https://www.sonarqube.org/) project. 

Note

You need to create an account at SonarCloud to get the variables for your build.

We will start by creating a sonarqube.yml file in our root directory:

version: 0.2

phases:
 install:
    commands:
      - wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli...