Skip to main content

Onboard one AWS account

POST 

/accounts/onboard

Onboards a single AWS account: Prism assumes its role into the account, creates or updates the SAML identity provider inside it, and writes the result to its own record of the account.

This is the operation that makes Prism able to reach into an AWS account. A database record of an account on its own creates no trust; this is what creates it. Prism does not have to hold a record for the account first; onboarding creates one if it is missing and updates it if it is not.

It is synchronous and it changes things in your AWS account. The request blocks until the AWS work has finished, and by the time it returns:

  • A SAML identity provider exists in the target account, created or updated with Prism's current metadata. If this step fails, the whole onboarding fails.
  • An IAM OIDC identity provider may also exist. A failure here is swallowed: it is logged server-side and the onboarding is still reported as a success, SAML-only. A 200 does not promise the OIDC provider was created; read data.account.oidc_status to see whether it was.
  • Prism's record of the account has been created or updated, with status: "active" and idp_status: "created".

Nothing is queued and nothing continues after the response; there is no job to poll. What the response says happened is what happened.

Re-onboarding an already-onboarded account is safe and is the intended repair path, but it is not inert: it overwrites the stored name with whatever accountName resolves to, refreshes the identity provider, and clears any recorded error.

An AWS-side failure is a 502, not a 400 or a 500: the account number was already validated, so the blame is upstream of Prism. Note that POST /accounts/validate reports the same class of failure as a 400 instead. The two operations genuinely disagree about which status an unreachable AWS account deserves, so handle each on its own terms rather than assuming one convention across the group.

Returns 200, not 201, and sends no Location header.

Request​

Responses​

The account onboarded, or would have on a dry run. A response reaches here only when the account genuinely succeeded: unlike the bulk operation, there is no partial success to hide in the payload.

The OIDC caveat above is the one thing a 200 does not cover.