Branch
Source:
src/AWS/Amplify/Branch.ts
A branch of an AWS Amplify Hosting app.
For apps without a connected Git repository, a branch is the target of the
manual-deploy pipeline: stage a zip with CreateDeployment, upload it to
the pre-signed URL, and release it with StartDeployment.
Creating Branches
Section titled “Creating Branches”Manual-Deploy Branch
const app = yield* App("MySite", { platform: "WEB" });const branch = yield* Branch("Main", { appId: app.appId, branchName: "main", stage: "PRODUCTION", enableAutoBuild: false,});Password-Protected Branch with Content TTL
const branch = yield* Branch("Preview", { appId: app.appId, branchName: "preview", stage: "DEVELOPMENT", ttl: "10 minutes", enableBasicAuth: true, // base64 of "user:password" basicAuthCredentials: Redacted.make(credentials),});