You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CloudFormation is a service provided by Amazon Web Services (AWS) that allows you to define and provision infrastructure as code.
@@ -14,7 +15,7 @@ With CloudFormation, you can use JSON or YAML templates to define your desired i
14
15
You can specify resources, their configurations, dependencies, and relationships in these templates.
15
16
16
17
LocalStack supports CloudFormation, allowing you to use the CloudFormation APIs in your local environment to declaratively define your architecture on the AWS, including resources such as S3 Buckets, Lambda Functions, and much more.
17
-
The [API coverage page]({{< ref "coverage_cloudformation" >}}) and [feature coverage](#feature-coverage) provides information on the extent of CloudFormation's integration with LocalStack.
18
+
The [API coverage page]() and [feature coverage](#feature-coverage) provides information on the extent of CloudFormation's integration with LocalStack.
18
19
19
20
## Getting started
20
21
@@ -29,15 +30,18 @@ CloudFormation stack is a collection of AWS resources that you can create, updat
29
30
Stacks are defined using JSON or YAML templates.
30
31
Use the following code snippet and save the content in either `cfn-quickstart-stack.yaml` or `cfn-quickstart-stack.json`, depending on your preferred format.
31
32
32
-
{{< tabpane >}}
33
-
{{< tab header="YAML" lang="yaml" >}}
33
+
<Tabs>
34
+
<TabItemlabel="YAML">
35
+
```yaml
34
36
Resources:
35
37
LocalBucket:
36
38
Type: AWS::S3::Bucket
37
39
Properties:
38
40
BucketName: cfn-quickstart-bucket
39
-
{{< /tab >}}
40
-
{{< tab header="JSON" lang="json" >}}
41
+
```
42
+
</TabItem>
43
+
<TabItem label="JSON">
44
+
```json
41
45
{
42
46
"Resources": {
43
47
"LocalBucket": {
@@ -48,45 +52,45 @@ Resources:
48
52
}
49
53
}
50
54
}
51
-
{{< /tab >}}
52
-
{{< /tabpane >}}
55
+
```
56
+
</TabItem>
57
+
</Tabs>
53
58
54
59
### Deploy the CloudFormation Stack
55
60
56
61
You can deploy the CloudFormation stack using the AWS CLI with the [`deploy`](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deploy/index.html) command.
57
62
The `deploy` command creates and updates CloudFormation stacks.
58
63
Run the following command to deploy the stack:
59
64
60
-
{{< command >}}
61
-
$ awslocal cloudformation deploy \
65
+
```bash
66
+
awslocal cloudformation deploy \
62
67
--stack-name cfn-quickstart-stack \
63
68
--template-file "./cfn-quickstart-stack.yaml"
64
-
{{< / command >}}
69
+
```
65
70
66
71
You can verify that the stack was created successfully by listing the S3 buckets in your LocalStack container using the [`ListBucket` API](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-buckets.html).
67
72
Run the following command to list the buckets:
68
73
69
-
{{< command >}}
70
-
$ awslocal s3api list-buckets
71
-
{{< / command >}}
74
+
```bash
75
+
awslocal s3api list-buckets
76
+
```
72
77
73
78
### Delete the CloudFormation Stack
74
79
75
80
You can delete the CloudFormation stack using the [`delete-stack`](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/delete-stack.html) command.
76
81
Run the following command to delete the stack along with all the resources created by the stack:
77
82
78
-
{{< command >}}
79
-
$ awslocal cloudformation delete-stack \
83
+
```bash
84
+
awslocal cloudformation delete-stack \
80
85
--stack-name cfn-quickstart-stack
81
-
{{< / command >}}
86
+
```
82
87
83
88
## Local User-Interface
84
89
85
90
You can also utilize LocalStack's local CloudFormation user-interface to deploy and manage your CloudFormation stacks using public templates.
86
91
You can access the user-interface at [`localhost:4566/_localstack/cloudformation/deploy`](http://localhost:4566/_localstack/cloudformation/deploy).
87
92
88
-
<imgsrc="localstack-cloudformation-local-user-interface.png"alt="Local CloudFormation UI in LocalStack"title="Local CloudFormation UI in LocalStack"width="900" />
89
-
<br><br>
93
+

90
94
91
95
You can utilize the CloudFormation user interface to provide an existing CloudFormation template URL, input the necessary parameters, and initiate the deployment directly from your browser.
92
96
Let's proceed with an example template to deploy a CloudFormation stack.
@@ -101,7 +105,7 @@ Upon submission, the stack deployment will be triggered, and a result message wi
101
105
The LocalStack Web Application provides a Resource Browser for managing CloudFormation stacks to manage your AWS resources locally.
102
106
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **CloudFormation** under the **Management/Governance** section.
The Resource Browser allows you to perform the following actions:
107
111
@@ -115,16 +119,16 @@ The Resource Browser allows you to perform the following actions:
115
119
The following code snippets and sample applications provide practical examples of how to use CloudFormation in LocalStack for various use cases:
116
120
117
121
-[Serverless Container-based APIs with Amazon ECS & API Gateway](https://github.com/localstack/serverless-api-ecs-apigateway-sample)
118
-
-[Deploying containers on ECS clusters using ECR and Fargate]({{< ref "/tutorials/ecs-ecr-container-app" >}})
122
+
-[Deploying containers on ECS clusters using ECR and Fargate]()
119
123
-[Messaging Processing application with SQS, DynamoDB, and Fargate](https://github.com/localstack/sqs-fargate-ddb-cdk-go)
120
124
121
125
## Feature coverage
122
126
123
-
{{< callout "tip" >}}
127
+
:::note
124
128
We are continually enhancing our CloudFormation feature coverage by consistently introducing new resource types.
125
129
Your feature requests assist us in determining the priority of resource additions.
126
130
Feel free to contribute by [creating a new GitHub issue](https://github.com/localstack/localstack/issues/new?assignees=&labels=feature-request&template=feature-request.yml&title=feature+request%3A+%3Ctitle%3E).
127
-
{{< /callout >}}
131
+
:::
128
132
129
133
### Features
130
134
@@ -145,17 +149,17 @@ Feel free to contribute by [creating a new GitHub issue](https://github.com/loca
145
149
| StackSets | Partial |
146
150
| Intrinsic Functions | Partial |
147
151
148
-
{{< callout >}}
152
+
:::note
149
153
Currently, support for `UPDATE` operations on resources is limited.
150
154
Prefer stack re-creation over stack update at this time.
151
-
{{< /callout >}}
155
+
:::
152
156
153
-
{{< callout >}}
157
+
:::note
154
158
Currently, support for `NoEcho` parameters is limited.
155
159
Parameters will be masked only in the `Parameters` section of responses to `DescribeStacks` and `DescribeChangeSets` requests.
156
160
This might expose sensitive information.
157
161
Please exercise caution when using parameters with `NoEcho`.
158
-
{{< /callout >}}
162
+
:::
159
163
160
164
### Intrinsic Functions
161
165
@@ -179,9 +183,9 @@ Please exercise caution when using parameters with `NoEcho`.
179
183
180
184
### Resources
181
185
182
-
{{< callout >}}
186
+
:::note
183
187
When utilizing the Community image, any resources within the stack that are not supported will be disregarded and won't be deployed.
0 commit comments