Reconnect your cloud account
On 15 October 2026, we moved the Lightning AI platform to new infrastructure. Its control plane now reaches your cloud account from a different identity than before. Until your account trusts this new identity, Lightning can't start, stop, or delete Studios, jobs, or other machines in your account, and data connections that go through your cluster stop working too.
You only need to make the change once per connected cloud account. It doesn't touch your data, your buckets, or any running machines.
- AWS: update the trust policy of the IAM role Lightning uses, so it trusts our new AWS account. Go to AWS.
- GCP: create a new key for the service account Lightning uses, and send it to us. Go to Google Cloud.
This page is only for cloud accounts connected before 15 October 2026. To connect an account for the first time, see Bring your own cloud.
Before you begin
Your Lightning contact will send you the values for your account:
| Value | Example |
|---|---|
| Cluster name in Lightning | my-cluster |
| AWS: CloudFormation stack name | lit-mgmt-my-cluster-ab12 |
| AWS: IAM role name | lai-mgmt-x7k2p |
| GCP: project ID | my-gcp-project |
| GCP: service account email | lightningbyoc1a2b3c4d@my-gcp-project.iam.gserviceaccount.com |
If you don't have them, you can find them yourself as described in each section.
AWS
The IAM role Lightning assumes (lai-mgmt-…) trusts Lightning's AWS account. That account has changed:
| AWS account ID | |
|---|---|
| Old, no longer used | 748115360335 |
| New | 653070064192 |
Nothing else in the trust policy changes. In particular, keep the sts:ExternalId condition exactly as it is: Lightning still uses the same external ID for your cluster.
What you need
- Permission to update the CloudFormation stack that created the role, or to update the role's trust policy (
iam:UpdateAssumeRolePolicy). - The stack name and role name. To find them, open CloudFormation → Stacks in the region where you first connected the account, and look for a stack named
lit-mgmt-<cluster name>-…. Its Outputs tab shows the role ARN (LightningRoleARN).
Option A: update the CloudFormation stack (recommended)
This keeps the stack and the role in step, so a later stack update doesn't put the old account back.
In the AWS console
- Open CloudFormation → Stacks, and select the
lit-mgmt-…stack. - Choose Update (on newer consoles, Update stack → Make a direct update).
- Choose Use existing template, and then Next.
- Change LightningAWSAccountID to
653070064192. Leave every other parameter as it is. - Choose Next twice, tick the box acknowledging that CloudFormation might create IAM resources with custom names, and choose Submit.
- Wait for the stack to reach
UPDATE_COMPLETE.
With the AWS CLI
STACK=lit-mgmt-my-cluster-ab12 # your stack name
REGION=us-east-1 # the region the stack is in
aws cloudformation update-stack \
--region "$REGION" \
--stack-name "$STACK" \
--use-previous-template \
--capabilities CAPABILITY_NAMED_IAM \
--parameters \
ParameterKey=LightningAWSAccountID,ParameterValue=653070064192 \
ParameterKey=ExternalID,UsePreviousValue=true \
ParameterKey=LightingRoleName,UsePreviousValue=true \
ParameterKey=LightningUserEmail,UsePreviousValue=true \
ParameterKey=LightningOrgID,UsePreviousValue=true \
ParameterKey=LightningOrgName,UsePreviousValue=true \
ParameterKey=LightningClusterID,UsePreviousValue=true
aws cloudformation wait stack-update-complete --region "$REGION" --stack-name "$STACK"LightingRoleName is spelled that way in the stack, so type it as shown.
If the command says a parameter doesn't exist, your stack is older and has fewer parameters. Run the following, and pass UsePreviousValue=true for each parameter it lists other than LightningAWSAccountID:
aws cloudformation describe-stacks --region "$REGION" --stack-name "$STACK" \
--query 'Stacks[0].Parameters'If your stack has no LightningAWSAccountID parameter at all, use option B.
Option B: edit the role's trust policy directly
Use this if you no longer have the stack, or can't update it.
- Open IAM → Roles, and select the
lai-mgmt-…role. - Open the Trust relationships tab, and choose Edit trust policy.
- In the statement that has the
sts:ExternalIdcondition, replacearn:aws:iam::748115360335:rootwitharn:aws:iam::653070064192:root. Change nothing else. - Choose Update policy.
The statement should end up like this, with your own external ID:
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::653070064192:root" },
"Action": "sts:AssumeRole",
"Condition": { "StringEquals": { "sts:ExternalId": "<your existing external ID>" } }
}If the role came from a CloudFormation stack that still exists, the stack still holds the old account. A later update of that stack would put it back, so update the stack's LightningAWSAccountID parameter as in option A the next time you can.
Check it
aws iam get-role --role-name lai-mgmt-x7k2p \
--query 'Role.AssumeRolePolicyDocument.Statement[].Principal' --output jsonReplace lai-mgmt-x7k2p with your role name. You should see arn:aws:iam::653070064192:root, and not 748115360335. The ecs-tasks.amazonaws.com service principal in the output stays as it is.
Then let your Lightning contact know: we confirm from our side that we can reach the account.
Google Cloud
Lightning reaches your GCP project with a key for a service account in your project (normally lightningbyoc<8 characters>@<project>.iam.gserviceaccount.com). The key we held no longer works on our new platform, so we need a new key for the same service account. Don't create a new service account, and don't run the setup script again: that would connect a second, separate cluster.
What you need
Permission to create service account keys in the project (
roles/iam.serviceAccountKeyAdmin, or Owner).The service account email. To find it, open IAM & Admin → Service accounts in the project and look for the account whose name starts with
lightningbyoc, or run:gcloud iam service-accounts list --project my-gcp-project --filter='email~^lightningbyoc'If you see more than one, ask your Lightning contact which one belongs to the cluster.
If your organization enforces the iam.disableServiceAccountKeyCreation policy, key creation is refused. Allow it for this project while you create the key, or ask your Lightning contact.
1. Create a new key
In Cloud Shell, or any shell signed in to gcloud:
PROJECT=my-gcp-project
SA=lightningbyoc1a2b3c4d@my-gcp-project.iam.gserviceaccount.com
gcloud iam service-accounts keys create ./lightning-key-file.json \
--iam-account "$SA" --project "$PROJECT"In the console, the same is IAM & Admin → Service accounts → (the account) → Keys → Add key → Create new key → JSON.
A service account can hold at most 10 keys. If creating one fails for that reason, delete one of the old keys first (step 3).
2. Send the key to Lightning
Before you send it, check that the request really comes from Lightning: if you're not sure, email support@lightning.ai to confirm it.
Send lightning-key-file.json to your Lightning contact only through the secure channel they give you. Don't send it by email, chat, or a ticket, and don't share it with anyone else. Once we confirm we have it, note the new key's ID, which you need in step 3, and then delete your local copy:
grep private_key_id ./lightning-key-file.json # note this ID
rm ./lightning-key-file.json3. Remove the old keys
The old keys were for the platform we have moved off, so nothing at Lightning uses them anymore. Once we confirm that your cluster works with the new key, delete them. List the keys:
gcloud iam service-accounts keys list --iam-account "$SA" --project "$PROJECT" --managed-by userKeep the key whose ID you noted in step 2. Delete each of the others, replacing OLD_KEY_ID with its ID from the list:
gcloud iam service-accounts keys delete OLD_KEY_ID --iam-account "$SA" --project "$PROJECT"4. If your organization restricts machine images
Lightning's machine images are in the project litaip-machine-dist. If your organization enforces the constraints/compute.trustedImageProjects policy, add projects/litaip-machine-dist to the allowed projects, or new machines in your project fail to start. Nothing else is needed on your side for images: we give your service account access to them.
Your data bucket
The bucket Lightning created in your account (lai-…) needs no change of its own, and its contents are untouched. Lightning reaches it the same way it reaches the rest of your account: on AWS through the lai-mgmt-… role, and on GCP through the lightningbyoc… service account. Once you've made the change above, the bucket works again.
The one exception is a policy you added yourself. If you wrote a bucket policy, a KMS key policy, or a VPC endpoint policy that names Lightning's old AWS account, 748115360335, replace it with 653070064192 there too.
After the change
We confirm that Lightning can reach your account again, and tell you when Studios and jobs start normally.
If anything here doesn't match what you see in your account, stop and contact us before changing anything else.
See also
Was this page helpful?
Thanks for the feedback.