A frontend build must publish static assets to S3 and invalidate CloudFront safely.
IntermediateScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer
Situation read → Static deploy with cache control.
What I'd do →
- Build with hashed filenames; upload assets with long cache headers:
aws s3 sync dist/ s3://bucket --cache-control "public,max-age=31536000,immutable" --exclude index.html. - Upload
index.htmllast withno-cache. - Invalidate only
/index.htmlor the changed paths:aws cloudfront create-invalidation --distribution-id $ID --paths /index.html.
Why → Hashed assets never need invalidation, which is faster and cheaper.
Interview tip → Upload order prevents broken pages mid-deploy.
More on Builds, Artifacts, Nexus, SonarQube and Testing
A Maven project resolves dependencies from Maven Central on every build and a left-pad style outage would stop all builds.BeginnerYou must publish snapshot and release artifacts without overwriting a released version.IntermediateEvery merge to main should produce a unique semantic version automatically.IntermediateAn npm build is non-reproducible: different versions install on different days.BeginnerThe SonarQube quality gate must block merging PRs that add new bugs, vulnerabilities or uncovered code.IntermediateCoverage shows 0% in SonarQube although tests run in CI.Intermediate