Pipeline tests check code, deployed behavior, performance, and recovery. Release actions use their results to decide whether a change can move forward.
SDLC and delivery models
The software development lifecycleThe process that organizes planning, building, testing, deploying, and maintaining software. (SDLC) organizes the work from planning software through maintaining it. A delivery pipeline automates the build, test, and release steps within that lifecycle.
How it works
- Plan requirements and design the solution.
- Implement the code and test its behavior. Testing can happen during implementation.
- Deploy the release to its target environment. ProductionThe environment that runs the software customers use. is the environment customers use.
- Maintain the software by fixing problems and monitoring performance and security.
| Model | How work progresses |
|---|---|
| Waterfall | Sequential phases depend on previous results. |
| Iterative | Repeated versions expand an initial subset of requirements. |
| Agile | Short cycles deliver incremental changes and use feedback. |
| Spiral | Repeated cycles include risk analysis. |
DevSecOpsThe practice of including security testing throughout software development. means including security testing throughout development. Continuous deliveryA process that automatically prepares tested changes for a human production release decision. prepares tested changes for a human release decision. Continuous deploymentA process that automatically releases changes to production after pipeline checks pass. makes that production release automatic.
Exam cues
- If the question says every change reaches staging but production requires approval, think continuous delivery, because the final release decision is manual.
- If the question says passing changes reach production automatically, think continuous deployment, because no explicit approval remains.
- If the question says repeated prototypes with risk analysis, think Spiral, because risk analysis drives its cycles.
Remember
- Common phases: plan, design, implement, test, deploy, maintain.
- Agile uses incremental changes and feedback.
- DevSecOps includes security testing throughout the lifecycle.
Trap: Continuous delivery does not require every passing change to reach production automatically. That describes continuous deployment.
Da documentação da AWS (10)
- The software development lifecycle organizes work to design, build, release, and maintain software.
- Common SDLC phases are plan, design, implement, test, deploy, and maintain.
- Testing can run alongside implementation; production is the software environment customers use.
- Waterfall puts phases in sequence, with each phase depending on the previous result.
- The iterative model begins with some requirements and improves the software through repeated versions.
- Agile uses short cycles and incremental changes with repeated evaluation of requirements and feedback.
- Spiral combines repeated development cycles with sequential work and prioritizes risk analysis.
- DevSecOps integrates security testing throughout software development.
- Continuous delivery automatically builds, tests, and stages changes, leaving the production release decision to a person.
- Continuous deployment releases to production automatically after the pipeline checks, without explicit approval.
Test types and stage placement
Pipeline tests check different kinds of requirements before a change moves forward. A unit testA test of application code that simulates its external dependencies. isolates code by simulating outside dependencies; tests against a deployed environment check how the application behaves as a system.
How it works
- Run unit tests and static application security testingAnalysis of source code to find security problems. (SAST), which inspects source code for security problems.
- Provision a test environment and run integration testsA test of technical requirements against a provisioned application environment. for technical requirements.
- Run acceptance testsA test of user requirements against a provisioned application environment. for user requirements. Dynamic application security testingSecurity testing that probes a running application for vulnerabilities. (DAST) probes the running application for vulnerabilities.
- For a shared environment in SUPERSEDED or QUEUED mode, put deployment and its tests in one stage. Give tests a higher
runOrder, the value that orders actions within a stage.
| Check | What it checks | Where it runs |
|---|---|---|
| Unit | Code behavior with simulated dependencies | Application code |
| SAST | Security problems in source | Source code |
| Integration | Technical requirements | Provisioned test environment |
| Acceptance, including user interface behavior | User requirements | Provisioned test environment |
| DAST | Vulnerabilities in a running application | Provisioned test environment |
| Synthetic | Ongoing system health | Continuous generated traffic |
CodeBuild can access private databases through VPCAn isolated virtual network for AWS resources. configuration. A VPC is an isolated virtual network. Builds that need public internet access also need a NATA mechanism that lets private resources establish outbound network connections. gateway or NAT instance as their outbound internet path. Device Farm has a pipeline test action for a configured pool of devices.
Exam cues
- If the question says unit tests pass but services fail together, think integration tests, because they exercise technical requirements in an environment.
- If the question says a release must satisfy user requirements, think acceptance tests, because they test those requirements against the application.
- If the question says test the exact deployment on a shared target, think one deploy-and-test stage in a locking mode, because the stage holds one execution through both actions.
Remember
- Lower
runOrderruns first; equal values run in parallel. - SUPERSEDED and QUEUED lock stages; PARALLEL executions run independently.
- An internet gateway alone does not give a VPC-configured CodeBuild build internet access.
Trap: Putting deployment and tests in the same stage does not serialize PARALLEL executions against a shared environment.
Deployment completes before the test action starts.
Tests must succeed before the stage completes.
Da documentação da AWS (14)
- Unit tests check application code while simulating external dependencies.
- Integration tests check technical requirements against a provisioned test environment.
- Acceptance tests check user requirements against a provisioned test environment.
- Static application security testing analyzes source code for security problems.
- Dynamic application security testing looks for vulnerabilities in a running test environment.
- AWS recommends unit tests and static security tests on code, plus integration and acceptance tests in a test environment.
- Synthetic tests continually generate traffic to check system health.
- CodeBuild VPC configuration allows builds to access private resources, including databases and internal load balancers.
- Internet access from VPC-configured CodeBuild builds needs a NAT gateway or NAT instance, not just an internet gateway.
- In SUPERSEDED and QUEUED modes, a stage processes one execution at a time; related deployment and subsequent test actions in the same stage process that execution.
- PARALLEL executions run independently without stage queues; AWS recommends targets that other executions do not share.
- CodePipeline actions with lower runOrder values run first; actions with the same value run in parallel.
- A CodePipeline Device Farm test action runs tests against a configured device pool.
- A VPC is a logically isolated virtual network for AWS resources.
Quality gates and evidence
A quality gate is a release decision that stops or pauses promotion when criteria are unmet. Test reports are evidence of what ran. CodeBuild command results, scan thresholds, and CodePipeline approval actions provide the decisions.
How it works
- Run checks in CodeBuild and make a failed requirement return an unsuccessful exit codeThe number a script returns to indicate whether it succeeded or failed., the number a process returns to its caller. Review
on-failure:CONTINUEadvances to the next phase;ABORTstops the build on supported EC2 compute. - Put cleanup in
finally, which runs even when a phase command fails. Commands in either block can fail the phase. - Collect result files in a buildspecA file that tells CodeBuild which commands to run and which outputs to collect. report group. A buildspec is the file that tells CodeBuild which commands to run and which outputs to collect. Export raw test files to S3 for longer retention.
- For EC2/on-premises deployments, use the CodeDeploy
ValidateServicelifecycle hookA script or function invoked at a defined deployment event., a script run at a defined deployment event, to check application health. Return nonzero on failure. - Apply release criteria before promotion, using scan thresholds or manual approval where required.
| Gate | What stops promotion |
|---|---|
| CodeBuild check | A failing command with an enforcing failure policy |
| InspectorScan | A vulnerability count above a configured severity threshold |
| Manual approval | Rejection or no decision within seven days |
InspectorScan supports SourceCodeScan and ECRImageScan. Its count limits are CriticalThreshold, HighThreshold, MediumThreshold, and LowThreshold.
For existing CodeGuru Reviewer repository associations, secret detection can identify credentials embedded in code. Replace those hardcoded secrets through Secrets Manager. Since November 7, 2025, new Reviewer repository associations cannot be created.
Exam cues
- If the question says coverage is below the team’s target but the build passes, think a coverage-check command, because generating the report does not encode the team’s release rule.
- If the question says an installed EC2 application is unhealthy, think a failing
ValidateServicescript, because installation success alone does not establish application health. - If the question says retain test evidence beyond a month, think export raw results to S3, because the CodeBuild report expires.
Remember
- CodeBuild test reports expire after 30 days.
- Coverage reports show line and branch coverage; JUnit XML is a supported test result format.
- Manual approval fails without a decision within seven days.
on-failureis unsupported on Lambda compute and reserved capacity.
Trap: A coverage report does not express your required minimum. The coverage check must fail when the release criterion is unmet.
Da documentação da AWS (17)
- A CodeBuild phase fails if a command in its commands or finally block fails.
- CodeBuild on-failure can ABORT the build, CONTINUE to the next phase, or RETRY.
- CodeBuild on-failure is supported only for CodeBuild EC2 compute images, not Lambda compute or reserved capacity.
- CodeBuild finally commands run even when a command in that phase fails.
- CodeDeploy EC2/on-premises ValidateService scripts check whether deployment completed successfully.
- CodeDeploy reports a lifecycle script failure when a script exits unsuccessfully, including a nonzero exit code.
- CodeBuild reports collect test result files through a buildspec report group, including JUnit XML results.
- A CodeBuild test report expires after 30 days.
- Exporting raw CodeBuild test result files to S3 preserves them beyond the report lifetime.
- CodeBuild coverage reports display line and branch coverage from result files generated by build commands.
- To enforce coverage in CodeBuild, run a coverage check that fails when the required coverage is unmet; report generation and command success are separate settings.
- InspectorScan supports SourceCodeScan and ECRImageScan modes.
- InspectorScan fails when finding counts exceed CriticalThreshold, HighThreshold, MediumThreshold, or LowThreshold.
- A CodePipeline manual approval pauses execution; approval resumes it, while rejection or no decision within seven days prevents continuation.
- CodeGuru Reviewer can identify unprotected secrets in code; Secrets Manager documentation explains replacing those hardcoded secrets.
- Since November 7, 2025, CodeGuru Reviewer permits only existing repository associations; new associations cannot be created.
- A CodeBuild buildspec defines build commands and related settings in YAML.
Load, stress, and performance baselines
Performance tests measure how an application behaves under traffic. A baselineA selected reference test run used to compare later performance results. is a saved reference run used to detect regressions, meaning results that worsen after a change.
How it works
- Choose an environment that mirrors productionThe environment that runs the software customers use. and define service-level objectives, the target values for latency, errors, and throughputThe rate at which a system processes requests..
- Set the traffic pattern. Start below normal load and increase it in steps to see where performance degrades.
- Use Distributed Load Testing on AWS for independent ECS test containersA packaged application process with the files it needs to run. on Fargate across Regions. Fargate runs containers without requiring you to manage servers.
- Compare results with a baseline. Inspect overall results, individual endpoints, and Regions, then correlate degradation with infrastructure metrics.
| Test | Load pattern | What it reveals |
|---|---|---|
| Load | Expected traffic | Whether expected capacity meets requirements |
| Stress | Beyond normal capacity | Breaking points |
| Endurance | Sustained traffic over time | Gradual problems such as memory leaks |
Exam cues
- If the question says generate traffic from several Regions without managing servers, think Distributed Load Testing on AWS, because its test runners use Fargate.
- If the question says find the breaking point, think stepped stress testing, because it increases load beyond normal capacity.
- If the question says a release became slower, think baseline comparison, because historical results expose regressions.
Remember
- Supported test inputs include JMeter, k6, Locust, and simple HTTP configuration.
- Throughput is the request rate; results include requests per second and error counts.
- Response-time percentiles include p50, p90, p95, and p99. A percentileA value describing a position in a distribution of response times. describes a position in the response-time distribution.
- Result views include Overall, By Endpoint, and By Region.
Trap: An acceptable average response time does not establish that response-time percentiles, error rate, and throughput meet the objectives. Compare each required metric.
A Fargate test container generates application requests.
A runner in another Region generates requests to the same target.
Da documentação da AWS (11)
- Load testing evaluates a system under expected concurrent users or transactions.
- Stress testing increases load beyond normal capacity to expose breaking points.
- Endurance testing holds load over an extended period to reveal problems such as memory leaks.
- AWS recommends performance tests in an environment that mirrors production and comparison with historical benchmarks.
- A stepped load test starts below typical usage and increases load to find where performance degrades.
- Distributed Load Testing on AWS runs independent test containers on Amazon ECS with AWS Fargate across multiple Regions.
- Distributed Load Testing supports JMeter, k6, Locust, and simple HTTP endpoint configuration.
- Distributed Load Testing reports request counts, errors, requests per second, and response-time percentiles including p50, p90, p95, and p99.
- A selected baseline test run lets Distributed Load Testing show percentage differences for later runs.
- Distributed Load Testing result views include Overall, By Endpoint, and By Region.
- Compare latency, error rate, and throughput with service-level objectives, then correlate degraded results with infrastructure metrics.
Failover test planning
Failover tests exercise how an application recovers when its primary resource becomes unavailable. Recovery time objectiveThe target time for restoring a system after an outage. (RTO) describes acceptable recovery time. Recovery point objectiveThe acceptable data loss after an outage measured in time. (RPO) describes acceptable data loss measured in time.
How it works
- Define the recovery objectives and select the database or traffic path to exercise. For FIS experiments, configure CloudWatch alarm stop conditions to stop when thresholds are reached.
- For a Multi-AZ RDS DB instance, reboot with failover. Multi-AZ means the database has a standby in another Availability ZoneA separate location within an AWS Region used to isolate failures., a separate location within a Region. With FIS, set
forceFailover: trueonaws:rds:reboot-db-instances. - For Aurora cluster failover, use
aws:rds:failover-db-cluster. For Aurora Global Database, separately test planned switchover and unplanned cross-Region failover. - For traffic recovery, invert a Route 53 health check or exercise a CloudFront origin groupA pair of primary and secondary origins used for CloudFront origin failover., which pairs primary and secondary origins. Invert the health check again to restore its interpretation.
- Assess recovery time and data loss against the objectives. A healthy Aurora global switchover synchronizes the secondary; an unplanned failover can lose unreplicated writes.
| Drill | Behavior to observe |
|---|---|
| RDS Multi-AZ reboot with failover | Application recovery after switching to standby |
| Aurora global switchover | Promotion after synchronization, with RPO zero |
| Aurora global unplanned failover | Recovery with possible loss of unreplicated writes |
| Route 53 health-check inversion | Healthy and unhealthy interpretations exchange |
| CloudFront origin group | Cache misses use the secondary for configured failures |
Exam cues
- If the question says force an RDS Multi-AZ instance failover with FIS, think
aws:rds:reboot-db-instancesandforceFailover: true, because the default does not force failover. - If the question says a planned Aurora Region change must lose no data, think switchover, because the secondary is synchronized first.
- If the question says a CloudFront drill never reaches the failed primary, think cache misses, because cache hits return stored objects.
Remember
- FIS
forceFailoverdefaults tofalse. - Aurora global switchover has RPO zero; unplanned failover can lose data.
- CloudFront failover supports
GET,HEAD, andOPTIONS. EnableOPTIONSas a cached method to fail it over. - CloudFront tries the primary again on later origin requests.
Trap: CloudFront origin failover does not redirect
POSTwrites to a secondary origin. A database recovery drill must also consider the application’s write path.
CloudFront tries the primary origin for the cache miss.
After a configured failure, CloudFront sends the eligible request to the secondary.
Da documentação da AWS (14)
- Recovery time objective is the target time to restore a system after an outage.
- Recovery point objective is acceptable data loss measured in time.
- A Multi-AZ RDS DB instance can be rebooted with failover to switch to its standby in another Availability Zone.
- The FIS aws:rds:reboot-db-instances action forces a Multi-AZ failover when forceFailover is true; its default is false.
- The FIS aws:rds:failover-db-cluster action invokes FailoverDBCluster on the target Aurora cluster.
- Aurora Global Database switchover synchronizes a healthy secondary before promotion and has a recovery point objective of zero.
- An unplanned Aurora Global Database failover can lose writes not yet replicated to the secondary Region.
- An inverted Route 53 health check treats healthy as unhealthy and unhealthy as healthy; inverting it again restores the original interpretation.
- CloudFront origin failover uses a primary and secondary origin in an origin group selected by a cache behavior.
- For an origin group, a CloudFront cache hit returns the cached object; on a cache miss it tries the primary and uses the secondary for configured failures.
- CloudFront origin failover supports GET, HEAD, and OPTIONS; OPTIONS must also be enabled as a cached HTTP method.
- CloudFront tries the primary for subsequent origin requests even after an earlier request failed over.
- FIS stop conditions use CloudWatch alarms to stop an experiment when a defined threshold is reached.
- Availability Zones are isolated locations within an AWS Region.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 30 flashcards em lista
What phases and models does the software development lifecycle use?
Plan, design, implement, test, deploy, and maintain. Waterfall is sequential; iterative development improves versions; Agile uses short incremental cycles; Spiral emphasizes risk analysis. DevSecOps integrates security testing throughout.
How do continuous delivery and continuous deployment differ at the production release step?
Continuous delivery keeps a tested release ready for a person to approve. Continuous deployment releases automatically after checks pass.
A team automatically builds, tests, and stages each change but requires a person to authorize production. Which delivery model is this?
Continuous delivery, because the final production decision remains manual.
A project needs repeated prototypes and explicit risk analysis as requirements change. Which SDLC model fits?
Spiral, because it combines repeated development cycles with risk analysis.
In an SDLC, must testing wait until all implementation has finished?
No. Testing can run alongside implementation; DevSecOps also puts security testing throughout development.
Which tests should a CI/CD pipeline run against source code and which need a test environment?
Run unit tests and static application security tests against code. Run integration, acceptance, and dynamic security tests against a provisioned test environment.
A team has passing unit tests but needs to prove its application meets user requirements before production. Which tests should it add?
Acceptance tests against a provisioned test environment. Unit tests simulate dependencies and do not establish user acceptance.
A CodePipeline in QUEUED mode deploys to a shared test environment. How can its test action inspect the change just deployed?
Place deployment and testing in the same stage, with a higher runOrder for testing. The stage lock keeps another execution from entering during those actions.
A CodePipeline in PARALLEL mode uses one shared test environment. Does placing deploy and test actions in one stage prevent concurrent overwrites?
No. PARALLEL executions are independent. Use separate targets or a locking execution mode for shared targets.
A CodeBuild integration test must connect to a private database. What project setting is needed?
Configure VPC access for the build. Provide NAT connectivity if the build also needs the public internet.
What is the difference between static and dynamic application security testing in a pipeline?
Static testing inspects source code. Dynamic testing probes a running application in a test environment.
A CodeDeploy EC2 deployment installs successfully but the application health check fails. How should its validation script signal failure?
Return a nonzero exit code from the ValidateService hook script so CodeDeploy records a failed lifecycle script.
A CodeBuild coverage report shows low coverage while all build commands succeed. How should a team enforce its minimum?
Run a coverage check that exits unsuccessfully below the required threshold. Report creation displays coverage; the command must enforce the rule.
Which CodePipeline mechanisms can stop promotion when release criteria are unmet?
A failed CodeBuild check, an InspectorScan vulnerability count above its configured threshold, or a rejected manual approval.
A team needs CodeBuild test evidence for longer than 30 days. What should it configure?
Export the raw test result files to S3. The CodeBuild report itself expires after 30 days.
A CodeDeploy deployment needs to check application health before it completes. How can a lifecycle script signal a failed check?
Run the check in the ValidateService hook and exit with a nonzero code on failure. CodeDeploy reports the lifecycle script failure.
An existing CodeGuru Reviewer repository association reports hardcoded secrets. What remediation does AWS document, and can a new association be created?
Replace hardcoded secrets using Secrets Manager. New Reviewer repository associations have been unavailable since November 7, 2025; existing associations remain usable.
Why can a CodeBuild pipeline continue after a failed command, and where should cleanup commands go?
Review on-failure: CONTINUE explicitly advances to the next phase. Put cleanup in finally so it runs even after a command failure; use ABORT for an enforcing check on supported EC2 compute.
A release team needs to detect performance regressions and discover the application breaking point. How should it test?
Compare response-time percentiles, throughput, and errors with a baseline under expected load, then increase load in steps beyond normal capacity to expose the breaking point.
A team needs load generators in several AWS Regions without managing servers. Which AWS solution fits?
Distributed Load Testing on AWS. It runs ECS containers on Fargate and supports JMeter, k6, Locust, and simple HTTP tests.
What distinguishes load, stress, and endurance tests?
Load tests use expected traffic. Stress tests exceed normal capacity. Endurance tests sustain load over time to expose gradual degradation.
A service passes a short load test but slows after hours of steady traffic. Which test should the team add?
An endurance test, because sustained load can expose memory leaks or gradual performance degradation.
An application release has worse p99 response times than its previous test run. How can Distributed Load Testing help compare them?
Set the previous run as the baseline and compare metric percentage differences. Inspect results by endpoint and Region, then correlate with infrastructure metrics.
Does an acceptable average response time establish that a load test met its performance objectives?
No. Compare response-time percentiles, error rate, and throughput with the objectives; the average alone does not describe those results.
A team needs to exercise database and traffic failover before launch. Which drills cover these paths?
Reboot a Multi-AZ RDS instance with failover; test Aurora Global Database switchover and unplanned failover; invert a Route 53 health check; and exercise a CloudFront origin group on cache misses. Assess recovery time and data loss.
A team must force Multi-AZ RDS instance failover with AWS FIS. Which action and parameter should it choose?
Use aws:rds:reboot-db-instances with forceFailover: true. For an Aurora cluster failover, use aws:rds:failover-db-cluster.
A healthy Aurora Global Database must change its primary Region without losing data. Which operation fits the drill?
Switchover. It synchronizes the secondary before promotion, giving a recovery point objective of zero.
A CloudFront origin-failover drill returns cached objects while the primary is unavailable. What should the team test?
Use cache misses to exercise the origin group with eligible request methods. Cache hits return stored objects without testing primary-origin recovery.
A CloudFront application sends POST requests to an origin group. Will primary-origin failure cause those requests to use the secondary?
No. CloudFront origin failover supports GET, HEAD, and OPTIONS, with OPTIONS enabled for caching.
What do RTO and RPO mean when assessing a failover test?
RTO measures recovery time after an outage. RPO measures data loss in time; an unplanned Aurora global failover can lose unreplicated writes.