Your team lead has finished creating a build project in the console.
You have access to run the build but not to access the project.
You want to specify a different source location for the build.
How can you achieve this?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - C.
Options A and B are incorrect since the question mentions that you don't have access to the project.
Option D is incorrect since you have to use the start-build command.
The AWS Documentation mentions the following.
To override the default build spec file name, location, or both, do one of the following.
Run the AWS CLI create-project or update-project command, setting the buildspec value to the path to the alternate build spec file relative to the value of the built-in environment variable CODEBUILD_SRC_DIR.
You can also do the equivalent with the create project operation in the AWS SDKs.
For more information, see Create a Build Project or Change a Build Project's Settings.
Run the AWS CLI start-build command, setting the buildspecOverride value to the path to the alternate build spec file relative to the value of the built-in environment variable CODEBUILD_SRC_DIR.
You can also do the equivalent with the start build operation in the AWS SDKs.
For more information on the build specification for AWS CodeBuild, please refer to the below link-
https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.htmlThe correct answer is C. Specify the new location of the build in a new buildspec.yml file and use the start-build command.
Explanation:
Amazon Web Services (AWS) CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy. It is a powerful service that allows you to build, test, and deploy code quickly and easily.
When you create a build project in AWS CodeBuild, you specify the source code location, build environment, build commands, and other parameters. However, if you want to specify a different source code location after the build project has been created, you need to update the buildspec.yml file and start a new build.
The buildspec.yml file is a configuration file that specifies the build commands and settings for your project. It is stored in the root directory of your source code repository. To specify a different source code location, you need to create a new buildspec.yml file that includes the new location.
Once you have created the new buildspec.yml file, you can start a new build using the start-build command in the AWS Command Line Interface (CLI) or in the AWS CodeBuild console. The start-build command initiates a new build using the updated buildspec.yml file.
Option A is incorrect because the update project command is used to update the settings of the build project, not the source code location.
Option B is partially correct because you need to create a new buildspec.yml file, but you don't need to issue the update-project command. Instead, you need to start a new build using the start-build command.
Option D is incorrect because there is no update-build command in AWS CodeBuild.