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
feat(core): stack synthesizer that uses CLI credentials (#18963)
Clarify documentation of stack synthesizers a bit more, it was very
short. Also add `CliCredentialStackSynthesizer`. Many corporate users
have requested to be able to NOT use the default bootstrap roles,
because they want to rely on user credentials to do authorization.
We now have the following 3 synthesizers:
- `LegacyStackSynthesizer`: asset parameters, no roles.
- `CliCredentialsStackSynthesizer`: conventional assets, no roles.
- `DefaultStackSynthesizer`: conventional assets, conventional roles.
(note: asset parameters, conventional roles does not seem like a
sensible option).
This will give people all the flexibility they need.
Closes#16888.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk/core/README.md
+39
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,45 @@ organize their deployments with. If you want to vend a reusable construct,
57
57
define it as a subclasses of `Construct`: the consumers of your construct
58
58
will decide where to place it in their own stacks.
59
59
60
+
## Stack Synthesizers
61
+
62
+
Each Stack has a *synthesizer*, an object that determines how and where
63
+
the Stack should be synthesized and deployed. The synthesizer controls
64
+
aspects like:
65
+
66
+
- How does the stack reference assets? (Either through CloudFormation
67
+
parameters the CLI supplies, or because the Stack knows a predefined
68
+
location where assets will be uploaded).
69
+
- What roles are used to deploy the stack? These can be bootstrapped
70
+
roles, roles created in some other way, or just the CLI's current
71
+
credentials.
72
+
73
+
The following synthesizers are available:
74
+
75
+
-`DefaultStackSynthesizer`: recommended. Uses predefined asset locations and
76
+
roles created by the modern bootstrap template. Access control is done by
77
+
controlling who can assume the deploy role. This is the default stack
78
+
synthesizer in CDKv2.
79
+
-`LegacyStackSynthesizer`: Uses CloudFormation parameters to communicate
80
+
asset locations, and the CLI's current permissions to deploy stacks. The
81
+
is the default stack synthesizer in CDKv1.
82
+
-`CliCredentialsStackSynthesizer`: Uses predefined asset locations, and the
83
+
CLI's current permissions.
84
+
85
+
Each of these synthesizers takes configuration arguments. To configure
86
+
a stack with a synthesizer, pass it as one of its properties:
87
+
88
+
```ts
89
+
newMyStack(app, 'MyStack', {
90
+
synthesizer: newDefaultStackSynthesizer({
91
+
fileAssetsBucketName: 'my-orgs-asset-bucket',
92
+
}),
93
+
});
94
+
```
95
+
96
+
For more information on bootstrapping accounts and customizing synthesis,
97
+
see [Bootstrapping in the CDK Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html).
98
+
60
99
## Nested Stacks
61
100
62
101
[Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) are stacks created as part of other stacks. You create a nested stack within another stack by using the `NestedStack` construct.
0 commit comments