A company uses AWS CodeBuild to compile a Java application. The buildspec.yml includes a 'pre_build' phase that runs SonarQube for static code analysis. The analysis requires access to a private SonarQube server hosted on an EC2 instance in the same VPC. The CodeBuild project is configured with a VPC ID, subnet IDs, and security group IDs. However, the build fails with a timeout when trying to connect to the SonarQube server. The security group for the SonarQube server allows inbound traffic on port 9000 from the CodeBuild security group. What is the MOST likely reason for the failure?
Trap 1: The CodeBuild project is not configured with the correct VPC…
Incorrect subnets would cause a different error, such as failure to launch build container.
Trap 2: The SonarQube server is using a self-signed certificate that…
This would cause an SSL error, not a timeout.
Trap 3: The CodeBuild project does not have internet access, so it cannot…
The SonarQube server is in the same VPC, so internet access is not required.
- A
The CodeBuild project is not configured with the correct VPC subnets.
Why wrong: Incorrect subnets would cause a different error, such as failure to launch build container.
- B
The security group for the SonarQube server does not allow inbound traffic on port 9000 from the CodeBuild security group.
Without inbound rule from CodeBuild's security group, the connection is blocked.
- C
The SonarQube server is using a self-signed certificate that CodeBuild does not trust.
Why wrong: This would cause an SSL error, not a timeout.
- D
The CodeBuild project does not have internet access, so it cannot reach the SonarQube server.
Why wrong: The SonarQube server is in the same VPC, so internet access is not required.