- Preparing a CloudFormation template (YAML)
- Creating a stack from the AWS Console
- Updating the stack to add tags
- Verifying the created resources
- Sign in to the AWS Console.
- Use the search bar to find and open CloudFormation (type “CloudF…” and select CloudFormation).


- Open your editor (Visual Studio Code recommended).
- Create a new folder for the project (for example:
C:\Users\Arno\Desktop\Project\). - Add a file named
stack.yaml.
stack.yaml:
YAML is indentation-sensitive. Use consistent spaces (not tabs) and ensure nested keys are indented properly. If you omit the
BucketName property, CloudFormation will create a unique physical name for the bucket (usually combining the stack name, logical ID, and a random suffix).- In CloudFormation click Create stack → With new resources (standard).
- Under “Specify template” choose Upload a template file → Choose file → select your
stack.yaml. - Click Next, provide a Stack name (for example
DemoStack), leave options as default, and complete the stack creation.

CREATE_IN_PROGRESS events for the stack and for the MyBucket resource. Wait until the stack status becomes CREATE_COMPLETE.

- Open the S3 console (search for S3).
- Look for a bucket whose name is derived from the stack (for example
demostack-mybucket-<random-suffix>). CloudFormation often prefixes the generated physical name with the stack name and logical ID.

CREATE_COMPLETE.

Author, Environment, CostCenter). To add a tag to the bucket, update stack.yaml by adding Properties with Tags under the MyBucket resource:
- Select the
DemoStackstack and click Update. - Choose “Replace current template” → Upload a template file → select the updated
stack.yaml. - Click Next, review the change set or options, and submit the update.
UPDATE_IN_PROGRESS entries for the stack and the MyBucket resource. Wait until the update completes.

- Open the S3 console and select the bucket.
- In the bucket Properties view, scroll to Tags. You should see the tag
Author: Arno.
Next steps and references
- To manage infrastructure as code at scale, explore AWS CloudFormation features such as Parameters, Outputs, Mappings, and Conditions.
- Learn more in the official AWS docs: AWS CloudFormation Documentation.
- If you prefer infrastructure as code with different tooling, consider Terraform: Terraform Registry.