You are using AWS CodePipeline service to build up a pipeline for a new web application.
In the Source stage, the source provider is GitHub, and its output artifact is configured as WebApp.
In the Build stage, there are two build actions in parallel and both of them have used AWS CodeBuild as the service provider.
For these two build actions, which configurations of input/output artifacts are correct?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - C.
Refer to.
https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html?icmpid=docs_acp_console#input-output-artifactsfor how to set up input/output artifacts of the CodeBuild stage in CodePipeline.
One thing to note is that CodeBuild should have at least 1 input artifact:
Option A is incorrect: As there is only 1 output artifact (WebApp) in the Source stage, the input artifact of the Build stage should be exactly the same.
So WebApp2 is incorrect.
Option B is incorrect: Because input artifacts of empty and WebApp2 are incorrect.
Option C is CORRECT: Because both input and output artifacts are appropriate.
Option D is incorrect: Because output artifact names must be unique within a pipeline which means the name of WebAppBuild should not be used in both CodeBuild stages.
The correct answer is D. Build Action 1 (input artifact: WebApp, output artifact:WebAppBuild); Build Action 2 (input artifact: WebApp, output artifact:WebAppBuild).
Explanation: In the Source stage of the pipeline, the source provider is GitHub, and its output artifact is configured as WebApp.
In the Build stage, there are two build actions in parallel, and both of them use AWS CodeBuild as the service provider.
When using AWS CodeBuild as the service provider, the build output artifacts are automatically uploaded to Amazon S3, where they can be used as inputs to subsequent stages in the pipeline.
Therefore, in order for the second build action to use the output of the first build action as input, they need to have the same output artifact name. That is why option D is the correct answer, since both build actions output the same artifact name 'WebAppBuild'.
Option A is incorrect because it uses different artifact names for both build actions, 'WebAppBuild1' and 'WebAppBuild2'. This would mean that the second build action wouldn't be able to use the output of the first build action.
Option B is incorrect because the first build action does not have an input artifact. This would mean that it would not be able to access the source code from the Source stage, which is essential for building the application.
Option C is incorrect because it uses different artifact names for both build actions, 'WebAppBuild1' and 'WebAppBuild2'. This would mean that the second build action wouldn't be able to use the output of the first build action.
Therefore, the correct configuration of input/output artifacts for the two build actions in parallel is option D.