A developer is configuring an AWS CodeBuild project to build a containerized application. The build process must retrieve a database credential that undergoes automatic rotation every days. In addition, the source code repository holds a custom build specification file at the path `build-configs/custom-buildspec.yml` instead of the root directory.
Which two configurations must the developer perform to ensure the build project executes successfully?
- Configure the CodeBuild project settings by specifying `build-configs/custom-buildspec.yml` in the buildspec configuration path.Cevap
- Store the database credential in AWS Secrets Manager and reference it in the `secrets-manager` section under the `env` sequence in the buildspec file.Cevap
- CStore the database credential as a SecureString parameter in AWS Systems Manager Parameter Store and enable the parameter's native automatic rotation schedule.
- DSave the build specification file in the `build-configs` directory as `custom-buildspec.yml` and rely on CodeBuild's default file lookup behavior.
- EUpdate the trust policy of the CodeBuild service role to allow the Systems Manager service principal (`ssm.amazonaws.com`) to assume the role.
Cevap
The developer must configure the CodeBuild project settings to point to the custom buildspec path, and store the database credential in AWS Secrets Manager while referencing it in the buildspec's env section.
To successfully execute this build project, the developer must specify the custom buildspec location (`build-configs/custom-buildspec.yml`) in the CodeBuild project configuration because CodeBuild defaults to looking for a file named `buildspec.yml` in the root directory. Additionally, because the database credential requires automatic rotation, it must be stored in AWS Secrets Manager (which supports rotation) and retrieved in the buildspec file using the `secrets-manager` parameter within the `env` section.
Adım Adım Çözüm
Anahtar Kavram
Configuring custom buildspec paths in AWS CodeBuild and integrating AWS Secrets Manager for secrets requiring automatic rotation.
Tahmini Süre:1m 30s