Soru

Zorluk: OrtaAWS CodePipeline

A developer is setting up a release pipeline in AWS CodePipeline that consists of a Source stage, a Build stage using AWS CodeBuild, and a Deploy stage. The developer needs to pass the build output files from the Build stage to the Deploy stage. Which configuration must the developer specify in the pipeline definition to transfer these files?

  1. A
    Configure the build action to upload the zip archive to a custom Amazon S3 bucket, and modify the Deploy stage's IAM role trust policy to trust the CodeBuild service role directly.
  2. Configure the build action to produce an output artifact, and configure the deploy action to accept that artifact as an input artifact.Cevap
  3. C
    Save the binary payload of the build output directly inside AWS Systems Manager Parameter Store as a SecureString parameter, then configure the deploy action to retrieve it.
  4. D
    Define the artifact paths within a custom buildspec.yml file located in a /config subdirectory of the source repository, and reference the paths as environment variables in the deploy stage.

Cevap

Configure the build action to produce an output artifact, and configure the deploy action to accept that artifact as an input artifact.
In AWS CodePipeline, files are passed between stages using input and output artifacts. The developer defines an output artifact for the CodeBuild action and references it as an input artifact in the deployment action. CodePipeline automatically manages the storage of these files in an Amazon S3 artifact bucket associated with the pipeline.

Adım Adım Çözüm

1
Identify the AWS CodePipeline mechanism for passing files between stages.
CodePipeline uses InputArtifacts and OutputArtifacts to move files between actions.
This is the native, secure, and automated way to manage flow of files in CodePipeline.
2
Assign the output artifact name in the Build stage.
The Build stage action produces an output artifact named (e.g.) BuildArtifact.
This registers the build output in CodePipeline's artifact store.
3
Reference the same artifact name as the input artifact in the Deploy stage.
The Deploy stage action consumes BuildArtifact as its input.
This tells CodePipeline to feed the build output files into the deployment step.

Anahtar Kavram

CodePipeline Artifacts
Tahmini Süre:1m 30s
Bu soruyu puanla