konokenj.cdk-api-mcp-server 0.57.0__py3-none-any.whl → 0.58.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. cdk_api_mcp_server/__about__.py +1 -1
  2. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-agentcore-alpha/README.md +119 -15
  3. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-imagebuilder-alpha/README.md +428 -8
  4. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +9 -7
  5. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appconfig/integ.configuration-kms.ts +2 -1
  6. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appconfig/integ.configuration.ts +3 -2
  7. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appmesh/README.md +4 -4
  8. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codecommit/integ.codecommit-code-asset-zip.ts +2 -1
  9. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codecommit/integ.codecommit-code-asset.ts +2 -1
  10. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +2 -1
  11. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +2 -1
  12. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-snapstart.ts +1 -1
  13. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-sourceKMSKeyArn.ts +2 -2
  14. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtimes.ts +2 -1
  15. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.nested-stack-in-product-stack.ts +3 -2
  16. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.encrypted.asset.ts +2 -2
  17. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.ts +2 -2
  18. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.autoscaling-update-policy.ts +2 -1
  19. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.intrinsic-deletion-policy.ts +2 -1
  20. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.nested-stacks.ts +3 -2
  21. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.resource-tags-wtih-intrinsics.ts +2 -1
  22. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/triggers/integ.triggers.ts +2 -1
  23. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/METADATA +2 -2
  24. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/RECORD +27 -27
  25. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/WHEEL +0 -0
  26. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/entry_points.txt +0 -0
  27. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -36,6 +36,202 @@ EC2 Image Builder supports AWS-managed components for common tasks, AWS Marketpl
36
36
  that you create. Components run during specific workflow phases: build and validate phases during the build stage, and
37
37
  test phase during the test stage.
38
38
 
39
+ ### Image Recipe
40
+
41
+ #### Image Recipe Basic Usage
42
+
43
+ Create an image recipe with the required base image:
44
+
45
+ ```ts
46
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'MyImageRecipe', {
47
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
48
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
49
+ )
50
+ });
51
+ ```
52
+
53
+ #### Image Recipe Base Images
54
+
55
+ To create a recipe, you have to select a base image to build and customize from. This base image can be referenced from
56
+ various sources, such as from SSM parameters, AWS Marketplace products, and AMI IDs directly.
57
+
58
+ ##### SSM Parameters
59
+
60
+ Using SSM parameter references:
61
+
62
+ ```ts
63
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'SsmImageRecipe', {
64
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
65
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
66
+ )
67
+ });
68
+
69
+ // Using an SSM parameter construct
70
+ const parameter = ssm.StringParameter.fromStringParameterName(
71
+ this,
72
+ 'BaseImageParameter',
73
+ '/aws/service/ami-windows-latest/Windows_Server-2022-English-Full-Base'
74
+ );
75
+ const windowsRecipe = new imagebuilder.ImageRecipe(this, 'WindowsImageRecipe', {
76
+ baseImage: imagebuilder.BaseImage.fromSsmParameter(parameter)
77
+ });
78
+ ```
79
+
80
+ ##### AMI IDs
81
+
82
+ When you have a specific AMI to use:
83
+
84
+ ```ts
85
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'AmiImageRecipe', {
86
+ baseImage: imagebuilder.BaseImage.fromAmiId('ami-12345678')
87
+ });
88
+ ```
89
+
90
+ ##### Marketplace Images
91
+
92
+ For marketplace base images:
93
+
94
+ ```ts
95
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'MarketplaceImageRecipe', {
96
+ baseImage: imagebuilder.BaseImage.fromMarketplaceProductId('prod-1234567890abcdef0')
97
+ });
98
+ ```
99
+
100
+ #### Image Recipe Components
101
+
102
+ Components from various sources, such as custom-owned, AWS-owned, or AWS Marketplace-owned, can optionally be included
103
+ in recipes. For parameterized components, you are able to provide the parameters to use in the recipe, which will be
104
+ applied during the image build when executing components.
105
+
106
+ ##### Custom Components in Image Recipes
107
+
108
+ Add your own components to the recipe:
109
+
110
+ ```ts
111
+ const customComponent = new imagebuilder.Component(this, 'MyComponent', {
112
+ platform: imagebuilder.Platform.LINUX,
113
+ data: imagebuilder.ComponentData.fromJsonObject({
114
+ schemaVersion: imagebuilder.ComponentSchemaVersion.V1_0,
115
+ phases: [
116
+ {
117
+ name: imagebuilder.ComponentPhaseName.BUILD,
118
+ steps: [
119
+ {
120
+ name: 'install-app',
121
+ action: imagebuilder.ComponentAction.EXECUTE_BASH,
122
+ inputs: {
123
+ commands: ['yum install -y my-application']
124
+ }
125
+ }
126
+ ]
127
+ }
128
+ ]
129
+ })
130
+ });
131
+
132
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'ComponentImageRecipe', {
133
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
134
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
135
+ ),
136
+ components: [
137
+ {
138
+ component: customComponent
139
+ }
140
+ ]
141
+ });
142
+ ```
143
+
144
+ ##### AWS-Managed Components in Image Recipes
145
+
146
+ Use pre-built AWS components:
147
+
148
+ ```ts
149
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'AwsManagedImageRecipe', {
150
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
151
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
152
+ ),
153
+ components: [
154
+ {
155
+ component: imagebuilder.AwsManagedComponent.updateOS(this, 'UpdateOS', {
156
+ platform: imagebuilder.Platform.LINUX
157
+ })
158
+ },
159
+ {
160
+ component: imagebuilder.AwsManagedComponent.awsCliV2(this, 'AwsCli', {
161
+ platform: imagebuilder.Platform.LINUX
162
+ })
163
+ }
164
+ ]
165
+ });
166
+ ```
167
+
168
+ ##### Component Parameters in Image Recipes
169
+
170
+ Pass parameters to components that accept them:
171
+
172
+ ```ts
173
+ const parameterizedComponent = imagebuilder.Component.fromComponentName(
174
+ this,
175
+ 'ParameterizedComponent',
176
+ 'my-parameterized-component'
177
+ );
178
+
179
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'ParameterizedImageRecipe', {
180
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
181
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
182
+ ),
183
+ components: [
184
+ {
185
+ component: parameterizedComponent,
186
+ parameters: {
187
+ environment: imagebuilder.ComponentParameterValue.fromString('production'),
188
+ version: imagebuilder.ComponentParameterValue.fromString('1.0.0')
189
+ }
190
+ }
191
+ ]
192
+ });
193
+ ```
194
+
195
+ #### Image Recipe Configuration
196
+
197
+ ##### Block Device Configuration
198
+
199
+ Configure storage for the build instance:
200
+
201
+ ```ts
202
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'BlockDeviceImageRecipe', {
203
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
204
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
205
+ ),
206
+ blockDevices: [
207
+ {
208
+ deviceName: '/dev/sda1',
209
+ volume: ec2.BlockDeviceVolume.ebs(100, {
210
+ encrypted: true,
211
+ volumeType: ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
212
+ })
213
+ }
214
+ ]
215
+ });
216
+ ```
217
+
218
+ ##### AMI Tagging
219
+
220
+ Tag the output AMI:
221
+
222
+ ```ts
223
+ const imageRecipe = new imagebuilder.ImageRecipe(this, 'TaggedImageRecipe', {
224
+ baseImage: imagebuilder.BaseImage.fromSsmParameterName(
225
+ '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
226
+ ),
227
+ amiTags: {
228
+ Environment: 'Production',
229
+ Application: 'WebServer',
230
+ Owner: 'DevOps Team'
231
+ }
232
+ });
233
+ ```
234
+
39
235
  ### Container Recipe
40
236
 
41
237
  A container recipe is similar to an image recipe but specifically for container images. It defines the base container
@@ -222,7 +418,7 @@ EC2 Image Builder supports AWS-managed components for common tasks, AWS Marketpl
222
418
  that you create. Components run during specific workflow phases: build and validate phases during the build stage, and
223
419
  test phase during the test stage.
224
420
 
225
- #### Basic Usage
421
+ #### Basic Component Usage
226
422
 
227
423
  Create a component with the required properties: platform and component data.
228
424
 
@@ -407,13 +603,13 @@ const component = new imagebuilder.Component(this, 'EncryptedComponent', {
407
603
  name: 'secure-setup',
408
604
  action: imagebuilder.ComponentAction.EXECUTE_BASH,
409
605
  inputs: {
410
- commands: ['echo "This component data is encrypted with KMS"'],
411
- },
412
- },
413
- ],
414
- },
415
- ],
416
- }),
606
+ commands: ['echo "This component data is encrypted with KMS"']
607
+ }
608
+ }
609
+ ]
610
+ }
611
+ ]
612
+ })
417
613
  });
418
614
  ```
419
615
 
@@ -654,3 +850,227 @@ containerDistributionConfiguration.addContainerDistributions({
654
850
  containerTags: ['latest', 'latest-1.0']
655
851
  });
656
852
  ```
853
+
854
+ ### Workflow
855
+
856
+ Workflows define the sequence of steps that Image Builder performs during image creation. There are three workflow types: BUILD (image building), TEST (testing images), and DISTRIBUTION (distributing container images).
857
+
858
+ #### Basic Workflow Usage
859
+
860
+ Create a workflow with the required properties: workflow type and workflow data.
861
+
862
+ ```ts
863
+ const workflow = new imagebuilder.Workflow(this, 'MyWorkflow', {
864
+ workflowType: imagebuilder.WorkflowType.BUILD,
865
+ data: imagebuilder.WorkflowData.fromJsonObject({
866
+ schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
867
+ steps: [
868
+ {
869
+ name: 'LaunchBuildInstance',
870
+ action: imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
871
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
872
+ inputs: {
873
+ waitFor: 'ssmAgent',
874
+ },
875
+ },
876
+ {
877
+ name: 'ExecuteComponents',
878
+ action: imagebuilder.WorkflowAction.EXECUTE_COMPONENTS,
879
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
880
+ inputs: {
881
+ 'instanceId': 'i-123',
882
+ },
883
+ },
884
+ {
885
+ name: 'CreateImage',
886
+ action: imagebuilder.WorkflowAction.CREATE_IMAGE,
887
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
888
+ inputs: {
889
+ 'instanceId': 'i-123',
890
+ },
891
+ },
892
+ {
893
+ name: 'TerminateInstance',
894
+ action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
895
+ onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
896
+ inputs: {
897
+ 'instanceId': 'i-123',
898
+ },
899
+ },
900
+ ],
901
+ outputs: [
902
+ {
903
+ name: 'ImageId',
904
+ value: '$.stepOutputs.CreateImage.imageId',
905
+ },
906
+ ],
907
+ }),
908
+ });
909
+ ```
910
+
911
+ #### Workflow Data Sources
912
+
913
+ ##### Inline Workflow Data
914
+
915
+ Use `WorkflowData.fromInline()` for existing YAML/JSON definitions:
916
+
917
+ ```ts
918
+ const workflow = new imagebuilder.Workflow(this, 'InlineWorkflow', {
919
+ workflowType: imagebuilder.WorkflowType.TEST,
920
+ data: imagebuilder.WorkflowData.fromInline(`
921
+ schemaVersion: 1.0
922
+ steps:
923
+ - name: LaunchTestInstance
924
+ action: LaunchInstance
925
+ onFailure: Abort
926
+ inputs:
927
+ waitFor: ssmAgent
928
+ - name: RunTests
929
+ action: RunCommand
930
+ onFailure: Abort
931
+ inputs:
932
+ instanceId.$: "$.stepOutputs.LaunchTestInstance.instanceId"
933
+ commands: ['./run-tests.sh']
934
+ - name: TerminateTestInstance
935
+ action: TerminateInstance
936
+ onFailure: Continue
937
+ inputs:
938
+ instanceId.$: "$.stepOutputs.LaunchTestInstance.instanceId"
939
+ `),
940
+ });
941
+ ```
942
+
943
+ ##### JSON Object Workflow Data
944
+
945
+ Most developer-friendly approach using JavaScript objects:
946
+
947
+ ```ts
948
+ const workflow = new imagebuilder.Workflow(this, 'JsonWorkflow', {
949
+ workflowType: imagebuilder.WorkflowType.BUILD,
950
+ data: imagebuilder.WorkflowData.fromJsonObject({
951
+ schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
952
+ steps: [
953
+ {
954
+ name: 'LaunchBuildInstance',
955
+ action: imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
956
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
957
+ inputs: {
958
+ waitFor: 'ssmAgent'
959
+ }
960
+ },
961
+ {
962
+ name: 'ExecuteComponents',
963
+ action: imagebuilder.WorkflowAction.EXECUTE_COMPONENTS,
964
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
965
+ inputs: {
966
+ 'instanceId': 'i-123'
967
+ }
968
+ },
969
+ {
970
+ name: 'CreateImage',
971
+ action: imagebuilder.WorkflowAction.CREATE_IMAGE,
972
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
973
+ inputs: {
974
+ 'instanceId': 'i-123'
975
+ }
976
+ },
977
+ {
978
+ name: 'TerminateInstance',
979
+ action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
980
+ onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
981
+ inputs: {
982
+ 'instanceId': 'i-123'
983
+ }
984
+ }
985
+ ],
986
+ outputs: [
987
+ {
988
+ name: 'ImageId',
989
+ value: '$.stepOutputs.CreateImage.imageId'
990
+ }
991
+ ]
992
+ })
993
+ });
994
+ ```
995
+
996
+ ##### S3 Workflow Data
997
+
998
+ For those workflows you want to upload or have uploaded to S3:
999
+
1000
+ ```ts
1001
+ // Upload a local file
1002
+ const workflowFromAsset = new imagebuilder.Workflow(this, 'AssetWorkflow', {
1003
+ workflowType: imagebuilder.WorkflowType.BUILD,
1004
+ data: imagebuilder.WorkflowData.fromAsset(this, 'WorkflowAsset', './my-workflow.yml'),
1005
+ });
1006
+
1007
+ // Reference an existing S3 object
1008
+ const bucket = s3.Bucket.fromBucketName(this, 'WorkflowBucket', 'my-workflows-bucket');
1009
+ const workflowFromS3 = new imagebuilder.Workflow(this, 'S3Workflow', {
1010
+ workflowType: imagebuilder.WorkflowType.BUILD,
1011
+ data: imagebuilder.WorkflowData.fromS3(bucket, 'workflows/my-workflow.yml'),
1012
+ });
1013
+ ```
1014
+
1015
+ #### Encrypt workflow data with a KMS key
1016
+
1017
+ You can encrypt workflow data with a KMS key, so that only principals with access to decrypt with the key are able to access the workflow data.
1018
+
1019
+ ```ts
1020
+ const workflow = new imagebuilder.Workflow(this, 'EncryptedWorkflow', {
1021
+ workflowType: imagebuilder.WorkflowType.BUILD,
1022
+ kmsKey: new kms.Key(this, 'WorkflowKey'),
1023
+ data: imagebuilder.WorkflowData.fromJsonObject({
1024
+ schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
1025
+ steps: [
1026
+ {
1027
+ name: 'LaunchBuildInstance',
1028
+ action: imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
1029
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
1030
+ inputs: {
1031
+ waitFor: 'ssmAgent',
1032
+ },
1033
+ },
1034
+ {
1035
+ name: 'CreateImage',
1036
+ action: imagebuilder.WorkflowAction.CREATE_IMAGE,
1037
+ onFailure: imagebuilder.WorkflowOnFailure.ABORT,
1038
+ inputs: {
1039
+ 'instanceId': 'i-123',
1040
+ },
1041
+ },
1042
+ {
1043
+ name: 'TerminateInstance',
1044
+ action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
1045
+ onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
1046
+ inputs: {
1047
+ 'instanceId': 'i-123',
1048
+ },
1049
+ },
1050
+ ],
1051
+ outputs: [
1052
+ {
1053
+ name: 'ImageId',
1054
+ value: '$.stepOutputs.CreateImage.imageId',
1055
+ },
1056
+ ],
1057
+ }),
1058
+ });
1059
+ ```
1060
+
1061
+ #### AWS-Managed Workflows
1062
+
1063
+ AWS provides a collection of workflows for common scenarios:
1064
+
1065
+ ```ts
1066
+ // Build workflows
1067
+ const buildImageWorkflow = imagebuilder.AwsManagedWorkflow.buildImage(this, 'BuildImage');
1068
+ const buildContainerWorkflow = imagebuilder.AwsManagedWorkflow.buildContainer(this, 'BuildContainer');
1069
+
1070
+ // Test workflows
1071
+ const testImageWorkflow = imagebuilder.AwsManagedWorkflow.testImage(this, 'TestImage');
1072
+ const testContainerWorkflow = imagebuilder.AwsManagedWorkflow.testContainer(this, 'TestContainer');
1073
+
1074
+ // Distribution workflows
1075
+ const distributeContainerWorkflow = imagebuilder.AwsManagedWorkflow.distributeContainer(this, 'DistributeContainer');
1076
+ ```
@@ -55,11 +55,11 @@ The `.with()` method is available after importing `@aws-cdk/mixins-preview/with`
55
55
 
56
56
  ## Creating Custom Mixins
57
57
 
58
- Mixins are simple classes that implement the `IMixin` interface:
58
+ Mixins are simple classes that implement the `IMixin` interface (usually by extending the abstract `Mixin` class:
59
59
 
60
60
  ```typescript
61
61
  // Simple mixin that enables versioning
62
- class CustomVersioningMixin implements IMixin {
62
+ class CustomVersioningMixin extends Mixin implements IMixin {
63
63
  supports(construct: any): boolean {
64
64
  return construct instanceof s3.CfnBucket;
65
65
  }
@@ -131,7 +131,7 @@ For every CloudFormation resource, CDK Mixins automatically generates type-safe
131
131
 
132
132
  ```typescript
133
133
  import '@aws-cdk/mixins-preview/with';
134
- import { CfnBucketPropsMixin } from '@aws-cdk/mixins-preview/aws-s3/mixins';
134
+
135
135
 
136
136
  const bucket = new s3.Bucket(scope, "Bucket")
137
137
  .with(new CfnBucketPropsMixin({
@@ -146,6 +146,8 @@ const bucket = new s3.Bucket(scope, "Bucket")
146
146
  Property mixins support two merge strategies:
147
147
 
148
148
  ```typescript
149
+ declare const bucket: s3.CfnBucket;
150
+
149
151
  // MERGE (default): Deep merges properties with existing values
150
152
  Mixins.of(bucket).apply(new CfnBucketPropsMixin(
151
153
  { versioningConfiguration: { status: "Enabled" } },
@@ -155,16 +157,16 @@ Mixins.of(bucket).apply(new CfnBucketPropsMixin(
155
157
  // OVERWRITE: Replaces existing property values
156
158
  Mixins.of(bucket).apply(new CfnBucketPropsMixin(
157
159
  { versioningConfiguration: { status: "Enabled" } },
158
- { strategy: PropertyMergeStrategy.OVERWRITE }
160
+ { strategy: PropertyMergeStrategy.OVERRIDE }
159
161
  ));
160
162
  ```
161
163
 
162
164
  Property mixins are available for all AWS services:
163
165
 
164
166
  ```typescript
165
- import { CfnLogGroupMixin } from '@aws-cdk/mixins-preview/aws-logs/mixins';
166
- import { CfnFunctionMixin } from '@aws-cdk/mixins-preview/aws-lambda/mixins';
167
- import { CfnTableMixin } from '@aws-cdk/mixins-preview/aws-dynamodb/mixins';
167
+ import { CfnLogGroupPropsMixin } from '@aws-cdk/mixins-preview/aws_logs/mixins';
168
+ import { CfnFunctionPropsMixin } from '@aws-cdk/mixins-preview/aws_lambda/mixins';
169
+ import { CfnTablePropsMixin } from '@aws-cdk/mixins-preview/aws_dynamodb/mixins';
168
170
  ```
169
171
 
170
172
  ## Error Handling
@@ -6,6 +6,7 @@ import {
6
6
  ConfigurationContent,
7
7
  HostedConfiguration,
8
8
  } from 'aws-cdk-lib/aws-appconfig';
9
+ import * as path from 'path';
9
10
 
10
11
  const app = new App();
11
12
 
@@ -21,7 +22,7 @@ const appConfigApp = new Application(stack, 'MyAppConfig', {
21
22
 
22
23
  new HostedConfiguration(stack, 'MyHostedConfigFromFile', {
23
24
  application: appConfigApp,
24
- content: ConfigurationContent.fromFile('config.json'),
25
+ content: ConfigurationContent.fromFile(path.join(__dirname, 'config.json')),
25
26
  kmsKey,
26
27
  });
27
28
 
@@ -21,6 +21,7 @@ import {
21
21
  RolloutStrategy,
22
22
  SourcedConfiguration,
23
23
  } from 'aws-cdk-lib/aws-appconfig';
24
+ import * as path from 'path';
24
25
 
25
26
  const SCHEMA_STR =
26
27
  `{
@@ -58,7 +59,7 @@ const deploymentStrategy = new DeploymentStrategy(stack, 'MyDeployStrategy', {
58
59
  // hosted config from file
59
60
  new HostedConfiguration(stack, 'MyHostedConfigFromFile', {
60
61
  application: appConfigApp,
61
- content: ConfigurationContent.fromFile('config.json'),
62
+ content: ConfigurationContent.fromFile(path.join(__dirname, 'config.json')),
62
63
  deletionProtectionCheck: DeletionProtectionCheck.BYPASS,
63
64
  });
64
65
 
@@ -70,7 +71,7 @@ new HostedConfiguration(stack, 'MyHostedConfig', {
70
71
  deployTo: [hostedEnv],
71
72
  validators: [
72
73
  JsonSchemaValidator.fromInline(SCHEMA_STR),
73
- JsonSchemaValidator.fromFile('schema.json'),
74
+ JsonSchemaValidator.fromFile(path.join(__dirname, 'schema.json')),
74
75
  ],
75
76
  deploymentStrategy,
76
77
  });
@@ -913,8 +913,8 @@ appmesh.Mesh.fromMeshName(this, 'imported-mesh', 'abc');
913
913
 
914
914
  ## IAM Grants
915
915
 
916
- `VirtualNode` and `VirtualGateway` provide `grantStreamAggregatedResources` methods that grant identities that are running
917
- Envoy access to stream generated config from App Mesh.
916
+ `VirtualNode` and `VirtualGateway` have a `grants` property that provides a `streamAggregatedResources`
917
+ methods that grant identities that are running Envoy access to stream generated config from App Mesh.
918
918
 
919
919
  ```ts
920
920
  declare const mesh: appmesh.Mesh;
@@ -922,9 +922,9 @@ const gateway = new appmesh.VirtualGateway(this, 'testGateway', { mesh });
922
922
  const envoyUser = new iam.User(this, 'envoyUser');
923
923
 
924
924
  /**
925
- * This will grant `grantStreamAggregatedResources` ONLY for this gateway.
925
+ * This will grant `appmesh:StreamAggregatedResources` ONLY for this gateway.
926
926
  */
927
- gateway.grantStreamAggregatedResources(envoyUser)
927
+ gateway.grants.streamAggregatedResources(envoyUser)
928
928
  ```
929
929
 
930
930
  ## Adding Resources to shared meshes
@@ -1,13 +1,14 @@
1
1
  import * as cdk from 'aws-cdk-lib';
2
2
  import * as codecommit from 'aws-cdk-lib/aws-codecommit';
3
3
  import { Code } from 'aws-cdk-lib/aws-codecommit';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new cdk.App();
6
7
  const stack = new cdk.Stack(app, 'aws-cdk-codecommit-repo-contents-zip-file');
7
8
 
8
9
  new codecommit.Repository(stack, 'Repo', {
9
10
  repositoryName: 'aws-cdk-codecommit-repo-contents-zip-file',
10
- code: Code.fromZipFile('./asset-test.zip'),
11
+ code: Code.fromZipFile(path.join(__dirname, 'asset-test.zip')),
11
12
  });
12
13
 
13
14
  app.synth();
@@ -1,13 +1,14 @@
1
1
  import * as cdk from 'aws-cdk-lib';
2
2
  import * as codecommit from 'aws-cdk-lib/aws-codecommit';
3
3
  import { Code } from 'aws-cdk-lib/aws-codecommit';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new cdk.App();
6
7
  const stack = new cdk.Stack(app, 'aws-cdk-codecommit-repo-contents-assets');
7
8
 
8
9
  new codecommit.Repository(stack, 'Repo', {
9
10
  repositoryName: 'aws-cdk-codecommit-repo-contents-assets',
10
- code: Code.fromDirectory('./asset-test'),
11
+ code: Code.fromDirectory(path.join(__dirname, 'asset-test')),
11
12
  });
12
13
 
13
14
  app.synth();
@@ -10,6 +10,7 @@ import * as route53targets from 'aws-cdk-lib/aws-route53-targets';
10
10
  import { App, Duration, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib/core';
11
11
  import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources';
12
12
  import { Construct } from 'constructs';
13
+ import * as path from 'path';
13
14
 
14
15
  interface CognitoUserProps {
15
16
  userPool: cognito.UserPool;
@@ -184,7 +185,7 @@ const testUser = new CognitoUser(testCase, 'User', cognitoUserProps);
184
185
  // this function signs in to the website and returns text content of the authenticated page body
185
186
  const signinFunction = new lambda.Function(testCase, 'Signin', {
186
187
  functionName: 'cdk-integ-alb-oidc-signin-handler',
187
- code: lambda.Code.fromAsset('alb-oidc-signin-handler', { exclude: ['*.ts'] }),
188
+ code: lambda.Code.fromAsset(path.join(__dirname, 'alb-oidc-signin-handler'), { exclude: ['*.ts'] }),
188
189
  handler: 'index.handler',
189
190
  runtime: lambda.Runtime.NODEJS_20_X,
190
191
  environment: {
@@ -11,6 +11,7 @@ import * as iam from 'aws-cdk-lib/aws-iam';
11
11
  import * as lambda from 'aws-cdk-lib/aws-lambda';
12
12
  import * as route53 from 'aws-cdk-lib/aws-route53';
13
13
  import * as route53targets from 'aws-cdk-lib/aws-route53-targets';
14
+ import * as path from 'path';
14
15
 
15
16
  interface CognitoUserProps {
16
17
  userPool: cognito.UserPool;
@@ -204,7 +205,7 @@ const testUser = new CognitoUser(testCase, 'User', cognitoUserProps);
204
205
  // this function signs in to the website and returns text content of the authenticated page body
205
206
  const signinFunction = new lambda.Function(testCase, 'Signin', {
206
207
  functionName: 'cdk-integ-alb-cognito-signin-handler',
207
- code: lambda.Code.fromAsset('alb-cognito-signin-handler', { exclude: ['*.ts'] }),
208
+ code: lambda.Code.fromAsset(path.join(__dirname, 'alb-cognito-signin-handler'), { exclude: ['*.ts'] }),
208
209
  handler: 'index.handler',
209
210
  runtime: lambda.Runtime.NODEJS_20_X,
210
211
  environment: {
@@ -33,7 +33,7 @@ new Function(stack, 'Python313SnapstartLambda', {
33
33
  });
34
34
 
35
35
  new Function(stack, 'DotnetSnapstartLambda', {
36
- code: Code.fromAsset('dotnet-handler'),
36
+ code: Code.fromAsset(path.join(__dirname, 'dotnet-handler')),
37
37
  handler: 'Handler',
38
38
  runtime: Runtime.DOTNET_8,
39
39
  snapStart: SnapStartConf.ON_PUBLISHED_VERSIONS,
@@ -80,7 +80,7 @@ class TestStack extends Stack {
80
80
  bucketName: 's3sourcekmskeyarnbucket',
81
81
  });
82
82
  const deployment = new s3deploy.BucketDeployment(this, 'DeployLambdaCode', {
83
- sources: [s3deploy.Source.asset('lambda-zip')],
83
+ sources: [s3deploy.Source.asset(path.join(__dirname, 'lambda-zip'))],
84
84
  destinationBucket: bucket,
85
85
  });
86
86
  const fnBucket = new lambda.Function(this, 'myFunction2', {
@@ -96,7 +96,7 @@ class TestStack extends Stack {
96
96
  this.functionName2 = fnBucket.functionName;
97
97
 
98
98
  // Using Custom Command
99
- const command = 'lambda-zip/python-lambda-handler.zip';
99
+ const command = path.join(__dirname, 'lambda-zip/python-lambda-handler.zip');
100
100
  const fnCustom = new lambda.Function(this, 'myFunction3', {
101
101
  runtime: lambda.Runtime.PYTHON_3_11,
102
102
  handler: 'index.handler',