- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Security
Secure an AWS Delivery Workflow with Gates, Secrets, and Policy
In this hands-on lab, you will secure an inherited AWS delivery pipeline that builds a container image and deploys it to Amazon ECS Fargate. You will replace over-privileged IAM permissions with least-privilege policies, move a plaintext credential into AWS Secrets Manager, and add Amazon ECR image-scanning and OWASP Dependency-Check gates that block vulnerable builds before deployment. You will then remediate a critical dependency vulnerability, rerun the controlled workflow, and trace its security and release evidence across AWS CodePipeline, Amazon S3, and CloudWatch Logs. After completing this lab, you will have gained the experience required to secure an AWS delivery workflow with gates, secrets, and policy controls.
Lab Info
Table of Contents
-
Challenge
Configure pipeline identity and secret access for the delivery workflow
Secure the inherited workflow's identity and secret handling without breaking delivery:
- Replace wildcard IAM permissions with supplied least-privilege policies.
- Move the plaintext deployment token into AWS Secrets Manager and configure CodeBuild to retrieve it at runtime.
- Verify the secured pipeline still builds and deploys successfully without exposing the secret.
-
Challenge
Add security checks for dependencies and images
Create and test two security checks against the inherited application:
- Configure an OWASP Dependency-Check gate to identify vulnerable application dependencies.
- Configure an Amazon ECR Basic image-scan gate to evaluate container image findings.
- Run both gates independently and confirm that they produce verdicts and preserve their reports.
-
Challenge
Use gate results to block or continue promotion
Use security-gate results to control whether a release can reach deployment:
- Add a Security stage before Deploy and configure both gates to run in parallel.
- Run the vulnerable application through the controlled pipeline and interpret the gate results.
- Confirm that the failing dependency gate blocks the new execution before it reaches Deploy.
-
Challenge
Remediate the failing dependency check and rerun the controlled workflow
Repair the vulnerability that caused the security gate to fail:
- Interpret the dependency report and identify the vulnerable
commons-textversion. - Upgrade the dependency from
1.9to1.10.0and release the updated source. - Confirm that both gates pass and the repaired execution continues successfully to Deploy.
- Interpret the dependency report and identify the vulnerable
-
Challenge
Verify that the workflow preserves useful security and release evidence
Trace the blocked and successful releases through their preserved evidence:
- Identify the pipeline execution IDs for the blocked and repaired releases.
- Compare their scan reports in Amazon S3 and their build logs in CloudWatch Logs.
- Confirm that the evidence explains why one release was stopped and the other was allowed to deploy.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.