Soru

Zorluk: KolayAWS CodeBuild

A developer is setting up an AWS CodeBuild project to compile a simple web application. The developer needs to define the build commands and pull database connection configurations securely during the build execution.

Which TWO configurations are required to support this setup? (Select TWO.)

  1. Place the buildspec.yml file at the root of the source directory to define the build phases.Cevap
  2. Reference sensitive database configurations from AWS Systems Manager Parameter Store or AWS Secrets Manager in the env section of the buildspec file.Cevap
  3. C
    Save the buildspec.yml file within a custom .codebuild/ subfolder at the top level of the repository without specifying a custom path in the project configuration.
  4. D
    Store non-sensitive configuration parameters in AWS Secrets Manager rather than AWS Systems Manager Parameter Store to optimize cost.
  5. E
    Edit the IAM permission policy attached to the CodeBuild service role to allow the CodeBuild service to assume the role.

Cevap

Placing the buildspec.yml file at the root of the source directory and referencing database configurations from Parameter Store or Secrets Manager in the env section of the buildspec file.
The correct options are placing the buildspec.yml file at the root of the source directory, which CodeBuild automatically locates, and referencing sensitive database configurations from Parameter Store or Secrets Manager in the env section of the buildspec to securely retrieve secrets.

Adım Adım Çözüm

1
Determine the default buildspec file placement.
CodeBuild expects the buildspec.yml file at the root of the source repository unless a custom path is specified in the build project settings.
This allows the build runner to find and execute the build steps automatically.
2
Determine the secure configuration retrieval method.
Map database configurations dynamically inside the env parameter block of the buildspec using Parameter Store or Secrets Manager.
This avoids hardcoding sensitive information in the source code.

Anahtar Kavram

AWS CodeBuild buildspec configuration and secret retrieval
Bu soruyu puanla