Stacktape deploys into your own AWS account with the AWS credentials on your machine. It finds them the same way the AWS CLI does, so if the AWS CLI works for you, Stacktape works too. Reading your project and writing the config don't need credentials. Only the deploy does.
Check what you already have
If you have the AWS CLI installed, run:
aws sts get-caller-identityIt prints the AWS account ID and the identity your credentials belong to. If it's the account you want to deploy to,
you're done. For a named profile, add --profile my-dev-account.
If it fails or prints another account, set up credentials with one of the two ways below.
Which AWS account to use
Use an account for development, not the one your production runs in. A separate account keeps experiments away from production data and makes it clear what they cost. If you don't have an AWS account yet, create one at AWS.
Don't deploy with the root user of the account, the email address you signed up with. Create an identity for daily work, as described below.
If your company uses IAM Identity Center (SSO)
Many companies sign in to AWS through AWS IAM Identity Center, often with a start URL like
https://my-company.awsapps.com/start. Ask whoever manages your AWS accounts for the URL and a role in a development
account, then run:
aws configure ssoIt asks for a session name, the start URL and its region, opens your browser to sign in, and lets you pick the
account and role. At the end it asks for a profile name, for example my-dev-account.
SSO sessions expire. When a command says your credentials are expired, sign in again:
aws sso login --profile my-dev-accountIf you have your own AWS account
For a personal account without IAM Identity Center, create an IAM user with an access key:
- Sign in to the AWS Management Console and open IAM.
- Go to Users and click Create user. Give it a name, for example
stacktape-dev. - Under permissions, choose Attach policies directly and select AdministratorAccess. See what permissions you need.
- Open the new user, go to Security credentials and click Create access key. Choose Command Line Interface (CLI) as the use case.
- Copy the access key ID and the secret access key. AWS shows the secret only once.
Then save the key as a profile on your machine. Either command works and stores it in ~/.aws/credentials:
stacktape aws-profile createaws configure --profile my-dev-accountAn access key works until you delete it. Keep it out of your repository, and delete it in IAM when you no longer need it.
Tell Stacktape which credentials to use
Stacktape picks credentials in this order:
--profile <name>on the command.- The
AWS_PROFILEenvironment variable. - AWS keys in environment variables, such as
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY. - A profile saved with
stacktape defaults set. - The
defaultprofile in~/.aws, and the rest of the standard AWS credential chain.
The init wizard takes the profile from the environment, so start it like this:
AWS_PROFILE=my-dev-account stacktape initFor other commands, pass the flag:
stacktape deploy --stage dev --profile my-dev-accountOn Windows PowerShell, set the variable first with $env:AWS_PROFILE = "my-dev-account".
What permissions you need
A deploy creates a CloudFormation stack with everything in your config: functions, containers, databases, buckets and the IAM roles they run with. The identity that deploys needs permission to create all of it, including IAM roles.
In a development account, the AdministratorAccess policy is the simple answer. In an account with restricted permissions, ask whoever manages it for a role that can create the resources in your config and their IAM roles. If a permission is missing, the deploy stops with the AWS error that names it.
What it costs
Credentials cost nothing. AWS bills the account for the resources you deploy. To get an email before a bill grows, set a budget in Billing and Cost Management → Budgets in the AWS console.