stacktape connect adds the AWS account you deploy to with the CLI to the Stacktape Console. It signs you in if needed, connects the account of your current AWS credentials to your organization, and finds the Stacktape stacks already in that account. Nothing is redeployed: your stacks keep their names, resources and URLs.
Use it after you deployed without an account and want the Console: logs, alarms, costs, Git deployments and team access. The Console is free up to $200 a month of AWS spend it manages. See Billing and subscription.
Usage
stacktape connectTo connect a different account, pick its AWS profile:
stacktape connect --profile productionWhat happens
- Sign-in. When this machine is not signed in, the CLI opens the same browser sign-in as
stacktape login. Pass--no-browserto only print the address, for example over SSH. - The AWS account. The CLI reads the account of your local AWS credentials:
--profile,AWS_PROFILEor the standard AWS credential chain. - The connection. When the account is not connected yet, the CLI creates the connection stack in it with your credentials. The stack creates an IAM role that the Console uses to read and deploy your stacks. It is a CloudFormation stack in
eu-west-1, whatever region you deploy to. When the account is already connected, the CLI says so and skips this step. - Your stacks. The Console looks for the Stacktape stacks in the account. They appear as projects and stages, and the CLI prints how many it found.
- The Console address. The CLI prints
Nothing was redeployed or changed.and the address of your projects in the Console.
If creating the connection stack with your credentials fails, for example because they lack IAM permissions, the CLI opens the AWS CloudFormation console instead. Create the stack there and return to the terminal. Connecting your AWS account describes the Console side, including the PENDING and BLOCKED states.
Who can connect an account
Owners and Admins can connect accounts. A Developer or Viewer reaches only the AWS accounts chosen for them, so the command stops with Your role in <organization> cannot connect AWS accounts. Ask an Owner or Admin to run stacktape connect with credentials for the account. See Team and access control.
In scripts and coding agents
With --agent the command never prompts and never opens a browser. It needs a sign-in first: run stacktape login or set STACKTAPE_API_KEY. When creating the connection stack fails, the command stops with an error instead of opening the browser.
When some stacks are missing
When the CLI cannot read stacks in a region, it names the region, and stacks there are not listed yet. When the search fails, the account stays connected. In both cases an Owner or Admin can run Find existing stacks on the AWS accounts page of the Console.
Undo it
To make the CLI work without the Console again, run stacktape logout. Nothing deployed changes. To also remove the Console's access to the account, delete the connection on the AWS accounts page of the Console and delete the connection stack in the AWS CloudFormation console. See Revoking access.
Options
stacktape connect5 options-h, --helpstringShow Help
More about --help
If provided, the command will not execute and will instead print help information.
--log-level"info" | "debug" | "error"Log Level
More about --log-level
The level of logs to print to the console.
info: Basic information about the operation.error: Only errors.debug: Detailed information for debugging.
--no-browserbooleanNo Browser
More about --no-browser
If
true, prints the address instead of opening a browser:initstill starts the wizard, andloginstill waits for you to approve the sign-in. Use this when the browser you want is not this machine's default, on another device, or behind a forwarded port.-p, --profilestringAWS Profile
More about --profile
The AWS profile to use for the command. You can manage profiles using the
aws-profile:*commands and set a default profile withdefaults set.For commands that use a connected AWS account,
--profile(orAWS_PROFILE) selects the connected account the profile belongs to, unless--aws-accountis set. The command fails if that account is not connected.--quietbooleanQuiet
More about --quiet
Hide progress, banners, success messages and hints. Command output, warnings and errors are still printed.