Soru

Zorluk: OrtaAWS CodePipeline

A development team is integrating an on-premises security scanning tool as a custom action in AWS CodePipeline. A custom worker application runs on-premises and processes the security scanning tasks.

Arrange the steps in the correct chronological order that the custom action worker must execute to process and complete a job in CodePipeline.

  1. 1The worker calls the PollForJobs API to retrieve available jobs for the custom action.
  2. 2The worker calls the AcknowledgeJob API using the job ID.
  3. 3The worker uses the temporary credentials from the job data to download the input artifacts and run the scanning tool.
  4. 4The worker calls the PutJobSuccessResult API to report execution completion.

Cevap

The custom worker must first poll for available jobs, acknowledge the retrieved job, process the job by downloading artifacts and running the scan, and finally report the success status back to CodePipeline.
The correct sequence starts with polling for jobs, followed by acknowledging the job to prevent duplicate executions, then downloading the artifacts and running the scan, and finally reporting the success status back to CodePipeline.

Adım Adım Çözüm

1
Poll for jobs
The worker receives a job token and details from CodePipeline.
Since the worker is on-premises and CodePipeline cannot initiate connection, the worker must poll CodePipeline for new jobs.
2
Acknowledge the job
The job status is set to in-progress in CodePipeline.
This prevents other worker instances from picking up the same job and verifies that the worker is actively handling it.
3
Process job workloads
Input artifacts are processed, and the security scan runs.
The worker retrieves input artifacts from S3 using the credentials in the job details, then performs the security scan.
4
Put job success result
CodePipeline transitions the stage action to succeeded.
CodePipeline requires an explicit API call to mark the action as complete before it can trigger the next stage.

Anahtar Kavram

AWS CodePipeline Custom Actions and the Worker Lifecycle
Tahmini Süre:1m 30s
Bu soruyu puanla