Connect your cloud account
Connecting a cloud account is what lets agents see and work on your real resources. Your agent deploys the StratoNext onboarding stack in the account, registers it as an environment, and then links the project’s CloudFormation stacks or Terraform code to it as deployments, so StratoNext can discover exactly which resources belong to the project.
You get: an environment that StratoNext can reach, and one or more deployments with their resources discovered and shown on the project page.
Time: about 15 minutes, most of it waiting for CloudFormation.
Before you start
Section titled “Before you start”- You finished Set up a project from your repository.
- Your agent is opened in that repository folder.
- The AWS CLI is configured on your machine with credentials that can create IAM roles in the account you want to connect, for example an admin profile.
- Decide whether StratoNext agents should run inside this account. If so, the account needs Amazon Bedrock model access, which means accepting the marketplace offer for the models the agents use.
Paste this prompt
Section titled “Paste this prompt”Using the StratoNext skill, connect my AWS account to StratoNext and link it to this project.
1. Ask me which AWS profile and region to use, and whether this account is PRODUCTION or TESTING.2. Ask me whether I want StratoNext agents deployed into this account. If yes, before going on, ask me to confirm that Amazon Bedrock model access is granted in this account (the marketplace offer accepted) for the models StratoNext agents use.3. Create the environment, download the StratoNext onboarding template, read it, and show me what it creates before deploying it. Confirm to me that the IAM roles it creates are read-only. Enable agent access, enable agent deployment only if I said yes in step 2, and generate a strong random external ID.4. Deploy the stack with my credentials, read back its outputs, and record the role ARNs on the environment. Then verify the connection.5. Find the CloudFormation stacks or Terraform code that belong to this project (look in this repository first) and create a deployment for each, linked to this project.6. Show me the resources StratoNext discovered.What the agent does
Section titled “What the agent does”The agent runs every step below for you. Nothing here is for you to type. Expand a step to see examples of the commands it might run. The exact calls depend on what it finds in your setup.
1. Creates the environment.
Example commands the agent might run
stratonext environment create --name "Production" --provider AWS --classification PRODUCTION \ --metadata AccountId=123456789012 --metadata DefaultRegion=us-east-12. Downloads and deploys the onboarding template. The stack creates IAM roles that only the
StratoNext credential broker can assume, read-only by default. No access keys are ever exchanged.
EnableAgentDeployment is set only if you chose to deploy agents into this account. See
How the connection works.
Example commands the agent might run
stratonext environment setup-template --provider AWS --output stratonext-setup.yamlaws cloudformation deploy --template-file stratonext-setup.yaml --stack-name stratonext-setup \ --capabilities CAPABILITY_NAMED_IAM \ --parameter-overrides EnableAgentAccess=true EnableAgentDeployment=true ExternalId=<random-secret>3. Records the role ARNs and verifies the connection.
Example commands the agent might run
aws cloudformation describe-stacks --stack-name stratonext-setup --query "Stacks[0].Outputs"stratonext environment update <environment_id> --metadata ...stratonext environment verify <environment_id>4. Links the project to what it runs on. A deployment ties the project to a CloudFormation stack or Terraform code in the environment. StratoNext then discovers the resources in it.
Example commands the agent might run
# A CloudFormation stackstratonext deployment create --environment-id <environment_id> --name "orders-api prod" \ --region us-east-1 --stack-name orders-api-prod
# Terraform code in this repositorystratonext deployment create --environment-id <environment_id> --name "orders-api prod" \ --region us-east-1 --terraform infra/The project comes from the folder’s .stratonext file, so the agent does not need to pass it.
Check the result
Section titled “Check the result”stratonext deployment liststratonext project getOpen the project in the web app to see the resource graph. Discovery runs in the background, so
give it a minute on large stacks. Run stratonext deployment refresh <deployment_id> after you
change the stack.
Next step
Section titled “Next step”Run your first task on the account you just connected.