There is no single command or button called "cloud formation up" in AWS CloudFormation. What people mean by it almost always comes down to one of two things: bringing a stack up into existence for the first time (creating the resources described in a template), or bringing a stack that has drifted, failed or been deleted back up into a working state. The shortest working answer is: put your template somewhere CloudFormation can read it, run a create or update operation against a unique stack name, then watch the stack events until it reaches a settled state. If a stack already exists and is stuck, you usually need to update it, delete and recreate it, or recover it with a rollback or import, not "push" it again.
Labels in the AWS Management Console and in the AWS CLI change slightly between versions and regions, so if a menu name looks different from what is described here, look for the closest equivalent. The following steps are general enough to work across the console and the CLI.
What You'll Need
- An AWS account with permission to create the resources in your template (CloudFormation needs to assume a role or use your credentials that can create EC2 instances, IAM roles, S3 buckets and so on).
- A CloudFormation template in YAML or JSON, ideally linted so the syntax is valid before you run anything.
- A unique stack name in your account and region, using letters, numbers and hyphens.
- The template stored somewhere CloudFormation can read: uploaded directly in the console, or in an S3 bucket accessible from the same region when using the CLI.
- A region selected deliberately. Stacks are regional: a stack that "up" in us-east-1 does not exist in eu-west-1.
- Any parameters your template requires, such as a key pair name, a VPC ID or an environment tag.
Step-by-Step
- Validate the template first. In the console, open CloudFormation and use the template validation option when uploading; in the CLI, run
aws cloudformation validate-template --template-body file://template.yaml. Fix every reported syntax error before going further, because a malformed template fails before any resource is created and the error message can be vague. - Confirm the region and credentials. In the CLI, check that the environment or profile you are using points at the account and region you intend:
aws sts get-caller-identityandaws configure list. In the console, check the region selector in the top right. Creating a stack in the wrong region is one of the most common causes of "it worked, but nothing is there". - Choose create versus update. If no stack with that name exists, create it. If it does, an update modifies the existing stack, and creating again with the same name will error. Decide which operation you actually want before you click anything.
- Start the operation. In the console, choose Create stack and upload your template file (or point to an S3 URL), then give the stack a name. In the CLI, run
aws cloudformation create-stack --stack-name my-stack --template-body file://template.yaml --parameters ParameterKey=Env,ParameterValue=dev --capabilities CAPABILITY_IAM. Useupdate-stackwith the same arguments for an existing stack. - Handle the capabilities prompt. If your template creates IAM resources, CloudFormation refuses to proceed without explicitly acknowledging it. Add
--capabilities CAPABILITY_IAM(orCAPABILITY_NAMED_IAMwhen the template names roles or users), and in the console tick the acknowledgement box. Read what you are acknowledging: it means the template can create identities with permissions. - Watch the events, not just the summary. In the console, open the stack and its Events tab, which lists each resource as it is created. In the CLI, poll with
aws cloudformation describe-stack-events --stack-name my-stackor useaws cloudformation wait stack-create-complete --stack-name my-stackto block until it finishes. The first resource with a failure reason is the real problem; later failures are usually knock-on effects. - Confirm the settled state. A successful create ends in
CREATE_COMPLETE. A successful update ends inUPDATE_COMPLETE. Anything else, includingROLLBACK_COMPLETE, needs attention before you proceed. - Verify the resources exist. Open the Resources tab or run
aws cloudformation describe-stack-resources --stack-name my-stack, then check a couple of the created services directly (for example the EC2 console) to confirm they are present and in the expected region. - Record the outputs. If the template defines outputs, such as a load balancer URL or bucket name, read them from the Outputs tab or
aws cloudformation describe-stacks --stack-name my-stack --query "Stacks[0].Outputs". Save them where your team can find them. - If you need to bring a broken stack back up, decide between an update with a fixed template, a rollback to a previous version with
aws cloudformation rollback-stack --stack-name my-stack(only valid while the stack is in an update-rollback state), or deleting and recreating it. Deleting removes the resources it manages: check whether any of them hold data you need to keep, and take a snapshot or export first if so.
Common Mistakes
- Forgetting the region. The stack exists; you are looking in the wrong region. Check the selector before assuming failure.
- Reusing a stack name for a create. CloudFormation requires unique names per account and region, so a second create fails immediately.
- Missing capabilities. Templates with IAM resources fail without the acknowledgement, and the error is easy to skim past.
- Leaving a stack in ROLLBACK_COMPLETE and retrying the create. A stack in that state cannot be updated; you must delete it first, then create again.
- Changing a property that requires replacement without realising it. Some updates replace a resource, which can mean a new instance or a new database rather than a modification. Read the change set before executing it: in the console, create a change set; in the CLI, use
create-change-setanddescribe-change-set, and look for the Replacement column. - Hardcoding values that differ by environment. Account IDs, AMI IDs and subnet IDs are region-specific; use parameters instead.
- Ignoring deleted resource retention. Deleting a stack deletes what it created, subject to any deletion policy you set. If a resource holds data, set a retention or snapshot policy in the template first.
Tips
- Use change sets for every update. They show exactly which resources will be added, modified or replaced before anything runs, which converts most surprise failures into informed decisions.
- Keep templates in version control and pass parameters per environment rather than editing the template between environments.
- Name resources with a prefix taken from a parameter so stacks in the same account do not collide.
- Use stack policies or termination protection on stacks that manage critical resources, so an accidental delete is blocked.
- Prefer small, single-purpose stacks over one enormous template. Failures are easier to isolate and rollback is less disruptive.
- Add outputs for anything a human or another stack will need to reference, such as endpoints and identifiers.
Troubleshooting
The create fails and rolls back immediately. Open the Events tab and find the earliest failure, not the last one. Common causes are a missing parameter, an IAM permission your own credentials lack, or a resource quota reached in that region.
The stack sits in CREATE_IN_PROGRESS for a long time. Some resources, such as NAT gateways or databases, simply take several minutes. If it exceeds a plausible wait, check the resource's own service console for an error, since CloudFormation may be waiting on a resource that is failing quietly.
You get "No updates are to be performed". The template and parameters match what is already deployed. Change something real, or accept that no action is needed.
The stack is stuck in UPDATE_ROLLBACK_FAILED. This is the hardest state to recover from. Use the continue-update-rollback option, which lets you skip specific resources that are blocking the rollback, then fix and redeploy. Do this carefully: skipping a resource leaves it in whatever state it is in, so reconcile it manually afterwards.
A resource was changed by hand outside CloudFormation. The stack is now drifted. Use drift detection to see which resources differ, then either update the template to match reality or update the stack to bring the resource back in line.
If that did not work, delete the stack (after confirming nothing valuable will be destroyed) and create it fresh from the corrected template. If deletion fails, a resource may have a deletion policy or dependency preventing removal; read the deletion events for the blocking resource.
Frequently Asked Questions
Is there a literal "cloudformation up" command?
No. The closest CLI equivalents are create-stack and update-stack. Tools and CI pipelines often wrap these in a single "up" style command, but that wrapper is not part of AWS CloudFormation itself.
Can I create the same stack in two regions?
Yes, but they are separate stacks with separate resources. Run the create operation once per region with the same template and region-appropriate parameters.
Why does my template need capabilities?
Because it creates IAM resources. CloudFormation requires you to explicitly confirm that you understand the template will create or modify permissions, so it cannot happen by accident.
Does deleting a stack delete my data?
By default, yes, resources it created are removed. Set a deletion or retention policy in the template for anything holding data, and snapshot databases before deleting.
How do I bring a deleted stack back?
You recreate it from the same template and parameters. The original resources are gone unless they had a retention policy, so this builds fresh resources rather than restoring the old ones.
Can I preview what an update will change?
Yes, using a change set. Create it, describe it, and execute it only once the list of additions, modifications and replacements looks right.