A developer is configuring a test stage in AWS CodePipeline that invokes an AWS Lambda function to run integration tests against an Amazon RDS database. The Lambda function requires access to the database credentials and must inform CodePipeline of the test execution results so the pipeline can proceed or halt. Which configuration steps should the developer perform to meet these requirements? (Select TWO.)
- Store the database credentials in AWS Secrets Manager and grant the Lambda execution role permission to retrieve the secret.Cevap
- Program the Lambda function to parse the job ID from the event payload and invoke PutJobSuccessResult or PutJobFailureResult to report the outcome to CodePipeline.Cevap
- CStore the database credentials as a standard parameter in Systems Manager Parameter Store and retrieve them using the Parameter Store API.
- DModify the trust policy of the Lambda execution role to allow the CodePipeline service principal to assume the role.
- ESave the database credentials as plaintext environment variables in the Lambda function configuration to bypass permission checks.
Cevap
Store the database credentials in AWS Secrets Manager and grant the Lambda execution role permission to retrieve the secret. Program the Lambda function to parse the job ID from the event payload and invoke PutJobSuccessResult or PutJobFailureResult to report the outcome to CodePipeline.
The correct steps involve securely managing credentials and properly signaling CodePipeline. Storing database credentials in AWS Secrets Manager is secure and supports automatic rotation. Additionally, AWS CodePipeline expects any invoked Lambda action to notify it of success or failure by calling PutJobSuccessResult or PutJobFailureResult using the job ID extracted from the event payload.
Adım Adım Çözüm
Anahtar Kavram
AWS CodePipeline integration with AWS Lambda requires the Lambda function to explicitly return status using the PutJobSuccessResult or PutJobFailureResult API, and secrets should be managed securely using AWS Secrets Manager.
Tahmini Süre:2m 0s