Answer – C
Use the AWS CLI command to specify different parameters that need to be run for the build. Since the developer can run the build, he can run the build by changing the parameters from the command line. The same is also mentioned in the AWS Documentation.
Option A is incorrect because A buildspec is a collection of build commands and related settings, in YAML format, that CodeBuild uses to run a build. You can include a buildspec as part of the source code, or you can define a buildspec when you create a build project. However, the developer does not have access to the code.
Option B is incorrect because the developer does not have access to the code and to edit the CodeBuild project.
Option D is incorrect because it should be the buildspecOverride property instead of buildspec property.
For more information on running the command via the CLI, please refer to the below Link-
https://docs.aws.amazon.com/codebuild/latest/userguide/run-build.html#run-build-cli
Note:
As per the question, the developer doesn`t have access to edit the code build project but only have access to run the build. So for overriding the existing build we can make use of the BuildspecOverride attribute.
As per AWS,
buildspecOverride
: Optional string. A build spec declaration that overrides for this build the one defined in the build project. If this value is set, it can be either an inline build spec definition or the path to an alternate build spec file relative to the value of the built-in
CODEBUILD_SRC_DIR
environment variable.