Run the first release
Publish the site through the pipeline and verify the files, the headers and the page.
About 15 min · Verified 8 October 2026
Start it#
Release a change#
Open CodePipelinePipelinesshortlink-web-prod and choose Release change. This uses the newest commit on main, which includes your bucket edit.
Compare the commit shown in Source with GitHubyour forkCommits. The latest commit should be your chore(deploy): publish the website to my own bucket.
Watch the three stages#
| Stage | What good looks like | Time |
|---|---|---|
| Source | Green with your commit ID | ~20 s |
| Build | Log shows Tests 23 passed, then Vite's ✓ built in …, then UPLOAD_ARTIFACTS succeeded | 1 to 3 min |
| DeployWeb | Log shows upload: lines from aws s3 sync, then one upload: for index.html | under 1 min |
In the DeployWeb log you should see lines like:
[Container] Running command aws s3 sync shortlink-web/dist/ s3://your-bucket/ --delete --region ap-south-1
upload: shortlink-web/dist/assets/index-AbC123.js to s3://your-bucket/assets/index-AbC123.js
delete: s3://your-bucket/assets/index-OldHash.jsVerify#
Check the bucket and the headers#
aws s3 ls s3://<WEB_BUCKET>/ --recursive --region ap-south-1 | tail -n 8
aws s3api head-object --region ap-south-1 --bucket <WEB_BUCKET> --key index.html \
--query '{modified:LastModified,type:ContentType,cache:CacheControl}'Replace <WEB_BUCKET> with your own value (or fill in the known ones once under My values at the top of the page).
modified is a few minutes ago (the pipeline wrote it), type is text/html and cache is no-cache. The listing shows index.html at the root and your files under assets/.Check that the new build calls your API#
curl -s <WEB_URL>/ | grep -o 'assets/[^"]*\.js' | head -n 1Replace <WEB_URL> with your own value (or fill in the known ones once under My values at the top of the page).
Take that path and fetch it:
curl -s <WEB_URL>/assets/<BUNDLE_FILE>.js | grep -c "<ALB_DNS>"Replace <WEB_URL> <BUNDLE_FILE> <ALB_DNS> with your own value (or fill in the known ones once under My values at the top of the page).
The count must be 1 or more. If it is 0 the build ran without VITE_API_BASE_URL, so check the variable on shortlink-web-build.
Open the site#
Open <WEB_URL> in a private window or hard-refresh (Cmd Shift R or Ctrl Shift R).
The pipeline ran, but the site did not change
- You are seeing a cached page. Hard-refresh.
index.htmlisno-cache, but a stale service worker or a proxy can still hold the old one. - DeployWeb wrote to a different bucket. Open the log and read the
s3://…in the sync line. It must be<WEB_BUCKET>. - The build was cached. Look at the commit ID in Source. If it is not your latest, push again or choose Release change.
DeployWeb failed
AccessDeniedon a bucket you do not recognise → the buildspec still points at the original bucket (see the Point the deploy file at your bucket chapter). Fix the file, push, release again.AccessDeniedon your bucket → the inline policy oncodebuild-shortlink-web-deploy-service-roleis missing or lists the wrong bucket name.test -f shortlink-web/dist/index.htmlfails → the build artifact lacks the site. Open the Build action and check theartifactssection ran.YAML_FILE_ERROR … deploy/buildspec-web-deploy.yml→ the file is missing from the artifact. Checkbuildspec-web.ymllists it underartifacts.files.
Next: ship a change.
Found a mistake? Edit this page on GitHub.