Verify and activate
Activation is the moment your product turns the feature on for a customer, after its own check proves the new deployment works. It applies when you launch the portal from your product with a Deploy button, and when you build it into your product with your own setup screen.
Example UI /Ready
Document processing
Settings ยท Deploy in your cloud
Deployed. Run a connection test.
The service is running in your AWS account. Test it from your app before you switch traffic over.
Resources
Compute3Running
- Compute clustercomputeRunning
- API serverapiRunning
- Event processoreventsRunning
Data1Running
- Uploads bucketuploadsRunning
Secrets and keys2Running
- Service credentialscredentialsRunning
- Application secretssecretsRunning
Networking and access3Running
- Networkdefault-networkRunning
- Management identitymanagementRunning
- Service account (application)application-saRunning
- Endpoint
- https://docs.customer-1.internal
- Version
- 12
- Connection test
- Not run
Show it when status is running, currentReleaseId equals desiredReleaseId, and your check hasn't passed yet.
- No endpoint yet. The
inforesponse can lack a public endpoint forapi. Keep Ready to connect and read it again. - Check failed. Show the real error ("Health check returned 503") with Test again. Don't offer a deployment retry: the deployment is fine.
- Private endpoint. A check from your backend can't reach it. Run it from the customer's network, or show instructions instead of a test button.
- Wrong target. A fallback to your hosted service can answer the check. Make the check prove this deployment served it.
{
"status": "running",
"platform": "aws",
"resources": {
"api": {
"type": "container",
"publicEndpoints": {
"app": { "url": "https://app.k3x9.deploy.acme.com", "protocol": "http", "host": "app.k3x9.deploy.acme.com", "port": 443 }
}
}
}
}running means Alien finished deploying. It doesn't prove that your product can reach the service, that DNS resolves from where it calls, or that the customer's data is in place.
Read the endpoint
Server. Read the deployment's public endpoints. Resource IDs come from your alien.ts; here the container is api, and publicEndpoints is keyed by the name you gave .publicEndpoint().
GET /v1/deployments/{id}/info
import { alien } from "./alien"
export async function getApiUrl(deploymentId: string) {
const info = await alien.deployments.getInfo({ id: deploymentId })
const api = info.resources["api"]?.publicEndpoints
return api ? Object.values(api)[0]?.url : undefined
}alien.deployments.getInfo({ id }) returns one deployment's endpoints with your API key. Don't confuse it with alien.deployment.getInfo() (GET /v1/deployment-info), the setup context the portal reads with a setup token.
See Networking for public and private endpoints.
Activate
Server. Run a check from your backend, then set your own flag:
import { getApiUrl } from "./endpoint"
export async function verifyAndActivate(customerId: string, deploymentId: string) {
const url = await getApiUrl(deploymentId)
if (!url) return { ok: false, reason: "No endpoint yet" }
const res = await fetch(`${url}/health`, { signal: AbortSignal.timeout(10_000) })
if (!res.ok) return { ok: false, reason: `Health check returned ${res.status}` }
await db.customers.update(customerId, { byocEndpoint: url, byocActive: true })
return { ok: true }
}- Your product decides. Run activation automatically after a passing check, or show a Finish setup button that runs it.
- Two facts on your page. The deployment status from Alien, and your own Active flag. Until the check passes, show Ready to connect, not Active.
- Switch traffic last. Send work to the deployment only after activation.
Test it
- Fail the check. Point it at a path that returns 503, and confirm the feature stays off with the real error on the page.
- Private endpoint. Deploy with
endpointAccess: "private", and confirm your page shows instructions instead of a test your backend can't run. - Pass the check. Confirm your page moves to Active and your product sends work to the deployment.
Next
- Show deployment progress: the states before ready
- Updates and connection: what to show after activation
- Remove a deployment: switch traffic off before removal
Errors and retries
Show a deployment's errors so customers know whether to wait, fix something in their cloud, or retry, and hide the noise Alien retries on its own.
Updates and connection
Keep your deployment card honest after initial setup. Show when a new release needs the customer's admin, and when Alien can't confirm the current state.