konokenj.cdk-api-mcp-server 0.56.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.

Potentially problematic release.


This version of konokenj.cdk-api-mcp-server might be problematic. Click here for more details.

Files changed (33) 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 +603 -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-dynamodb/README.md +46 -2
  11. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md +45 -2
  12. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.compound.ts +32 -0
  13. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2.compound.ts +43 -0
  14. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +2 -1
  15. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +2 -1
  16. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/README.md +30 -0
  17. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-snapstart.ts +1 -1
  18. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-sourceKMSKeyArn.ts +2 -2
  19. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.multi-tenancy.ts +24 -0
  20. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtimes.ts +2 -1
  21. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.nested-stack-in-product-stack.ts +3 -2
  22. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.encrypted.asset.ts +2 -2
  23. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.ts +2 -2
  24. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.autoscaling-update-policy.ts +2 -1
  25. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.intrinsic-deletion-policy.ts +2 -1
  26. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.nested-stacks.ts +3 -2
  27. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.resource-tags-wtih-intrinsics.ts +2 -1
  28. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/triggers/integ.triggers.ts +2 -1
  29. {konokenj_cdk_api_mcp_server-0.56.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/METADATA +2 -2
  30. {konokenj_cdk_api_mcp_server-0.56.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/RECORD +33 -30
  31. {konokenj_cdk_api_mcp_server-0.56.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/WHEEL +0 -0
  32. {konokenj_cdk_api_mcp_server-0.56.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/entry_points.txt +0 -0
  33. {konokenj_cdk_api_mcp_server-0.56.0.dist-info → konokenj_cdk_api_mcp_server-0.58.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -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();
@@ -381,7 +381,7 @@ https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-mgmt
381
381
 
382
382
  Secondary indexes allow efficient access to data with attributes other than the `primaryKey`. DynamoDB supports two types of secondary indexes:
383
383
 
384
- * Global secondary index - An index with a `partitionKey` and a `sortKey` that can be different from those on the base table. A `globalSecondaryIndex` is considered "global" because queries on the index can span all of the data in the base table, across all partitions. A `globalSecondaryIndex` is stored in its own partition space away from the base table and scales separately from the base table.
384
+ * Global secondary index - An index with partition key(s) and optional sort key(s) that can be different from those on the base table. A `globalSecondaryIndex` is considered "global" because queries on the index can span all of the data in the base table, across all partitions. A `globalSecondaryIndex` is stored in its own partition space away from the base table and scales separately from the base table.
385
385
 
386
386
  * Local secondary index - An index that has the same `partitionKey` as the base table, but a different `sortKey`. A `localSecondaryIndex` is "local" in the sense that every partition of a `localSecondaryIndex` is scoped to a base table partition that has the same `partitionKey` value.
387
387
 
@@ -404,7 +404,41 @@ const table = new dynamodb.TableV2(this, 'Table', {
404
404
  });
405
405
  ```
406
406
 
407
- Alternatively, you can add a `globalSecondaryIndex` using the `addGlobalSecondaryIndex` method:
407
+ #### Compound Keys
408
+
409
+ Global secondary indexes support compound keys, allowing you to specify multiple partition keys and/or multiple sort keys. This enables more flexible query patterns for complex data models.
410
+
411
+ **Key Constraints:**
412
+ - You can specify up to **4 partition keys** per global secondary index
413
+ - You can specify up to **4 sort keys** per global secondary index
414
+ - Use **either** `partitionKey` (singular) **or** `partitionKeys` (plural), but not both
415
+ - Use **either** `sortKey` (singular) **or** `sortKeys` (plural), but not both
416
+ - At least one partition key must be specified (either `partitionKey` or `partitionKeys`)
417
+ - For multiple keys, you **must** use the plural parameters (`partitionKeys` and/or `sortKeys`)
418
+ - **Keys cannot be added or modified after index creation** - attempting to add additional keys to an existing index will result in an error
419
+
420
+ **Example with compound partition and sort keys:**
421
+
422
+ ```ts
423
+ const table = new dynamodb.TableV2(this, 'Table', {
424
+ partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
425
+ globalSecondaryIndexes: [
426
+ {
427
+ indexName: 'compound-gsi',
428
+ partitionKeys: [
429
+ { name: 'gsi_pk1', type: dynamodb.AttributeType.STRING },
430
+ { name: 'gsi_pk2', type: dynamodb.AttributeType.NUMBER },
431
+ ],
432
+ sortKeys: [
433
+ { name: 'gsi_sk1', type: dynamodb.AttributeType.STRING },
434
+ { name: 'gsi_sk2', type: dynamodb.AttributeType.BINARY },
435
+ ],
436
+ },
437
+ ],
438
+ });
439
+ ```
440
+
441
+ You can also add a `globalSecondaryIndex` using the `addGlobalSecondaryIndex` method:
408
442
 
409
443
  ```ts
410
444
  const table = new dynamodb.TableV2(this, 'Table', {
@@ -421,6 +455,16 @@ table.addGlobalSecondaryIndex({
421
455
  indexName: 'gsi2',
422
456
  partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
423
457
  });
458
+
459
+ // Add a GSI with compound keys
460
+ table.addGlobalSecondaryIndex({
461
+ indexName: 'compound-gsi2',
462
+ partitionKeys: [
463
+ { name: 'compound_pk1', type: dynamodb.AttributeType.STRING },
464
+ { name: 'compound_pk2', type: dynamodb.AttributeType.NUMBER },
465
+ ],
466
+ sortKey: { name: 'sk', type: dynamodb.AttributeType.STRING },
467
+ });
424
468
  ```
425
469
 
426
470
  You can configure `readCapacity` and `writeCapacity` on a `globalSecondaryIndex` when an `TableV2` is configured with provisioned `billing`. If `TableV2` is configured with provisioned `billing` but `readCapacity` or `writeCapacity` are not configured on a `globalSecondaryIndex`, then they will be inherited from the capacity settings specified with the `billing` configuration:
@@ -210,12 +210,55 @@ To get the partition key and sort key of the table or indexes you have configure
210
210
 
211
211
  ```ts
212
212
  declare const table: dynamodb.Table;
213
+
214
+ // For single keys, use schema() (deprecated for compound keys)
213
215
  const schema = table.schema();
214
216
  const partitionKey = schema.partitionKey;
215
217
  const sortKey = schema.sortKey;
216
218
 
217
- // In case you want to get schema details for any secondary index
218
- // const { partitionKey, sortKey } = table.schema(INDEX_NAME);
219
+ // For compound keys, use schemaV2() which returns normalized arrays
220
+ const schemaV2 = table.schemaV2();
221
+ const partitionKeys = schemaV2.partitionKeys; // Attribute[]
222
+ const sortKeys = schemaV2.sortKeys; // Attribute[]
223
+
224
+ // Get schema for a specific index
225
+ const indexSchema = table.schemaV2('INDEX_NAME');
226
+ ```
227
+
228
+ Note: `schema()` is deprecated for indexes with compound keys and will throw an error. Use `schemaV2()` instead, which always returns normalized arrays.
229
+
230
+ ## Global Secondary Indexes with Compound Keys
231
+
232
+ Global secondary indexes support compound keys, allowing you to specify multiple partition keys and/or multiple sort keys. This enables more flexible query patterns for complex data models.
233
+
234
+ **Key Constraints:**
235
+ - You can specify up to **4 partition keys** per global secondary index
236
+ - You can specify up to **4 sort keys** per global secondary index
237
+ - Use **either** `partitionKey` (singular) **or** `partitionKeys` (plural), but not both
238
+ - Use **either** `sortKey` (singular) **or** `sortKeys` (plural), but not both
239
+ - At least one partition key must be specified (either `partitionKey` or `partitionKeys`)
240
+ - For multiple keys, you **must** use the plural parameters (`partitionKeys` and/or `sortKeys`)
241
+ - **Keys cannot be added or modified after index creation** - attempting to add additional keys to an existing index will result in an error
242
+
243
+ **Example:**
244
+
245
+ ```ts
246
+ const table = new dynamodb.Table(this, 'Table', {
247
+ partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
248
+ sortKey: { name: 'sk', type: dynamodb.AttributeType.STRING },
249
+ });
250
+
251
+ table.addGlobalSecondaryIndex({
252
+ indexName: 'compound-gsi',
253
+ partitionKeys: [
254
+ { name: 'gsi_pk1', type: dynamodb.AttributeType.STRING },
255
+ { name: 'gsi_pk2', type: dynamodb.AttributeType.NUMBER },
256
+ ],
257
+ sortKeys: [
258
+ { name: 'gsi_sk1', type: dynamodb.AttributeType.STRING },
259
+ { name: 'gsi_sk2', type: dynamodb.AttributeType.BINARY },
260
+ ],
261
+ });
219
262
  ```
220
263
 
221
264
  ## Kinesis Stream
@@ -0,0 +1,32 @@
1
+ import { App, RemovalPolicy, Stack } from 'aws-cdk-lib';
2
+ import { AttributeType, ProjectionType, Table } from 'aws-cdk-lib/aws-dynamodb';
3
+ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
4
+
5
+ const app = new App();
6
+ const stack = new Stack(app, 'aws-cdk-dynamodb-compound-keys');
7
+
8
+ const table = new Table(stack, 'Table', {
9
+ tableName: 'cdk-test-compound',
10
+ partitionKey: { name: 'pkey', type: AttributeType.NUMBER },
11
+ removalPolicy: RemovalPolicy.DESTROY,
12
+ });
13
+
14
+ table.addGlobalSecondaryIndex({
15
+ indexName: 'IndexA',
16
+ partitionKeys: [{ name: 'PK1', type: AttributeType.STRING }, { name: 'PK2', type: AttributeType.NUMBER }],
17
+ sortKeys: [{ name: 'SK1', type: AttributeType.STRING }, { name: 'SK2', type: AttributeType.NUMBER }],
18
+ projectionType: ProjectionType.INCLUDE,
19
+ nonKeyAttributes: ['bar'],
20
+ });
21
+
22
+ table.addGlobalSecondaryIndex({
23
+ indexName: 'IndexB',
24
+ partitionKey: { name: 'baz', type: AttributeType.STRING },
25
+ sortKeys: [{ name: 'bar', type: AttributeType.STRING }, { name: 'foo', type: AttributeType.NUMBER }],
26
+ projectionType: ProjectionType.INCLUDE,
27
+ nonKeyAttributes: ['blah'],
28
+ });
29
+
30
+ new IntegTest(app, 'aws-cdk-dynamodb-compound-key-gsi', {
31
+ testCases: [stack],
32
+ });
@@ -0,0 +1,43 @@
1
+ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
2
+ import { App, RemovalPolicy, Stack } from 'aws-cdk-lib';
3
+ import { AttributeType, ProjectionType, TableV2 } from 'aws-cdk-lib/aws-dynamodb';
4
+
5
+ const app = new App();
6
+ const stack = new Stack(app, 'aws-cdk-dynamodb-v2-compound-keys');
7
+
8
+ const table = new TableV2(stack, 'Table', {
9
+ tableName: 'cdk-test-tableV2-compound',
10
+ partitionKey: { name: 'pkey', type: AttributeType.NUMBER },
11
+ globalSecondaryIndexes: [{
12
+ indexName: 'IndexA',
13
+ partitionKeys: [{ name: 'GSIAPK1', type: AttributeType.STRING }, { name: 'GSIAPK2', type: AttributeType.STRING }],
14
+ sortKeys: [{ name: 'GSIASK1', type: AttributeType.STRING }, { name: 'GSIASK2', type: AttributeType.NUMBER }],
15
+ }],
16
+ removalPolicy: RemovalPolicy.DESTROY,
17
+ });
18
+
19
+ table.addGlobalSecondaryIndex({
20
+ indexName: 'IndexB',
21
+ partitionKeys: [{ name: 'PK1', type: AttributeType.STRING }, { name: 'PK2', type: AttributeType.NUMBER }],
22
+ sortKeys: [{ name: 'SK1', type: AttributeType.STRING }, { name: 'SK2', type: AttributeType.NUMBER }],
23
+ projectionType: ProjectionType.INCLUDE,
24
+ nonKeyAttributes: ['bar'],
25
+ });
26
+
27
+ table.addGlobalSecondaryIndex({
28
+ indexName: 'IndexC',
29
+ partitionKey: { name: 'baz', type: AttributeType.STRING },
30
+ sortKeys: [{ name: 'bar', type: AttributeType.STRING }],
31
+ projectionType: ProjectionType.INCLUDE,
32
+ nonKeyAttributes: ['blah'],
33
+ });
34
+
35
+ table.addGlobalSecondaryIndex({
36
+ indexName: 'IndexD',
37
+ partitionKeys: [{ name: 'PK3', type: AttributeType.STRING }, { name: 'PK4', type: AttributeType.NUMBER }],
38
+ sortKeys: [{ name: 'SK3', type: AttributeType.STRING }, { name: 'SK4', type: AttributeType.NUMBER }],
39
+ });
40
+
41
+ new IntegTest(app, 'aws-cdk-dynamodbv2-compound-key-gsi', {
42
+ testCases: [stack],
43
+ });
@@ -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: {
@@ -1258,6 +1258,36 @@ const fn = new lambda.Function(this, 'MyFunction', {
1258
1258
  });
1259
1259
  ```
1260
1260
 
1261
+ ## Lambda with Tenant Isolation
1262
+
1263
+ Lambda functions can be configured with tenant isolation to ensure that different tenants never share the same execution environment. This is useful for SaaS applications where you need to guarantee compute isolation between untrusted tenants while using a single Lambda function.
1264
+
1265
+ ```ts
1266
+ const fn = new lambda.Function(this, 'MyFunction', {
1267
+ runtime: lambda.Runtime.NODEJS_18_X,
1268
+ handler: 'index.handler',
1269
+ code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
1270
+ tenancyConfig: lambda.TenancyConfig.PER_TENANT,
1271
+ });
1272
+ ```
1273
+
1274
+ **Important considerations:**
1275
+
1276
+ * **Immutable configuration**: Tenant isolation can only be configured during function creation and cannot be modified on existing functions.
1277
+ * **Incompatible features**: The following features are not compatible with tenant isolation and will result in CloudFormation deployment errors:
1278
+ * **Provisioned Concurrency**
1279
+ * **Function URLs**
1280
+ * **SnapStart**
1281
+ * **Event Source Mappings** (except API Gateway):
1282
+ * ❌ SQS
1283
+ * ❌ DynamoDB
1284
+ * ❌ Kinesis
1285
+ * ❌ MSK
1286
+ * ❌ Self-managed Kafka
1287
+ * ✅ API Gateway (supported)
1288
+
1289
+ CDK validates these restrictions at synthesis time and provides clear error messages when incompatible features are configured.
1290
+
1261
1291
  ### Legacy Log Retention
1262
1292
 
1263
1293
  As an alternative to providing a custom, user controlled log group, the legacy `logRetention` property can be used to set a different expiration period.
@@ -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',
@@ -0,0 +1,24 @@
1
+ import { App, Stack } from 'aws-cdk-lib';
2
+ import * as integ from '@aws-cdk/integ-tests-alpha';
3
+ import { Function, InlineCode, Runtime, TenancyConfig } from 'aws-cdk-lib/aws-lambda';
4
+
5
+ const app = new App({
6
+ postCliContext: {
7
+ '@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
8
+ },
9
+ });
10
+
11
+ const stack = new Stack(app, 'aws-cdk-lambda-multi-tenancy');
12
+
13
+ new Function(stack, 'MultiTenantFunction', {
14
+ code: new InlineCode('foo'),
15
+ handler: 'index.handler',
16
+ runtime: Runtime.NODEJS_18_X,
17
+ tenancyConfig: TenancyConfig.PER_TENANT,
18
+ });
19
+
20
+ new integ.IntegTest(app, 'lambda-multi-tenancy', {
21
+ testCases: [stack],
22
+ });
23
+
24
+ app.synth();
@@ -1,6 +1,7 @@
1
1
  import { App, Stack } from 'aws-cdk-lib';
2
2
  import * as integ from '@aws-cdk/integ-tests-alpha';
3
3
  import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new App({
6
7
  postCliContext: {
@@ -11,7 +12,7 @@ const app = new App({
11
12
  const stack = new Stack(app, 'aws-cdk-lambda-runtime-management');
12
13
 
13
14
  new Function(stack, 'Lambda', {
14
- code: Code.fromAsset('dotnet-handler'),
15
+ code: Code.fromAsset(path.join(__dirname, 'dotnet-handler')),
15
16
  handler: 'Handler',
16
17
  runtime: Runtime.DOTNET_8,
17
18
  });
@@ -4,6 +4,7 @@ import * as sc from 'aws-cdk-lib/aws-servicecatalog';
4
4
  import * as lambda from 'aws-cdk-lib/aws-lambda';
5
5
  import * as s3 from 'aws-cdk-lib/aws-s3';
6
6
  import { IntegTest } from '@aws-cdk/integ-tests-alpha';
7
+ import * as path from 'path';
7
8
 
8
9
  const app = new App({
9
10
  postCliContext: {
@@ -42,13 +43,13 @@ class SampleNestedStack extends NestedStack {
42
43
 
43
44
  new lambda.Function(this, 'HelloHandler', {
44
45
  runtime: lambda.Runtime.PYTHON_3_9,
45
- code: lambda.Code.fromAsset('./assets'),
46
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
46
47
  handler: 'index.handler',
47
48
  });
48
49
 
49
50
  new lambda.Function(this, 'HelloHandler2', {
50
51
  runtime: lambda.Runtime.PYTHON_3_9,
51
- code: lambda.Code.fromAsset('./assetsv2'),
52
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
52
53
  handler: 'index.handler',
53
54
  });
54
55
  }
@@ -44,13 +44,13 @@ class TestAssetProductStack extends servicecatalog.ProductStack {
44
44
 
45
45
  new lambda.Function(this, 'HelloHandler', {
46
46
  runtime: lambda.Runtime.PYTHON_3_9,
47
- code: lambda.Code.fromAsset('./assets'),
47
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
48
48
  handler: 'index.handler',
49
49
  });
50
50
 
51
51
  new lambda.Function(this, 'HelloHandler2', {
52
52
  runtime: lambda.Runtime.PYTHON_3_9,
53
- code: lambda.Code.fromAsset('./assetsv2'),
53
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
54
54
  handler: 'index.handler',
55
55
  });
56
56
  }
@@ -95,13 +95,13 @@ class TestAssetProductStack extends servicecatalog.ProductStack {
95
95
 
96
96
  new lambda.Function(this, 'HelloHandler', {
97
97
  runtime: lambda.Runtime.PYTHON_3_9,
98
- code: lambda.Code.fromAsset('./assets'),
98
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
99
99
  handler: 'index.handler',
100
100
  });
101
101
 
102
102
  new lambda.Function(this, 'HelloHandler2', {
103
103
  runtime: lambda.Runtime.PYTHON_3_9,
104
- code: lambda.Code.fromAsset('./assetsv2'),
104
+ code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
105
105
  handler: 'index.handler',
106
106
  });
107
107
  }
@@ -1,12 +1,13 @@
1
1
  import * as core from 'aws-cdk-lib';
2
2
  import * as inc from 'aws-cdk-lib/cloudformation-include';
3
3
  import * as integ from '@aws-cdk/integ-tests-alpha';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new core.App();
6
7
  const stack = new core.Stack(app, 'Stack');
7
8
 
8
9
  new inc.CfnInclude(stack, 'Stack', {
9
- templateFile: 'test-templates/autoscaling-update-policy.json',
10
+ templateFile: path.join(__dirname, 'test-templates/autoscaling-update-policy.json'),
10
11
  });
11
12
 
12
13
  new integ.IntegTest(app, 'AutoScalingUpdatePolicyTest', {
@@ -1,13 +1,14 @@
1
1
  import * as core from 'aws-cdk-lib';
2
2
  import * as inc from 'aws-cdk-lib/cloudformation-include';
3
3
  import * as integ from '@aws-cdk/integ-tests-alpha';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new core.App();
6
7
 
7
8
  const stack = new core.Stack(app, 'Stack');
8
9
 
9
10
  new inc.CfnInclude(stack, 'Stack', {
10
- templateFile: 'test-templates/fn-if-deletion-policy.json',
11
+ templateFile: path.join(__dirname, 'test-templates/fn-if-deletion-policy.json'),
11
12
  });
12
13
 
13
14
  new integ.IntegTest(app, 'DeletionPolicyTest', {
@@ -1,15 +1,16 @@
1
1
  import * as core from 'aws-cdk-lib';
2
2
  import * as inc from 'aws-cdk-lib/cloudformation-include';
3
+ import * as path from 'path';
3
4
 
4
5
  const app = new core.App();
5
6
 
6
7
  const stack = new core.Stack(app, 'ParentStack');
7
8
 
8
9
  new inc.CfnInclude(stack, 'ParentStack', {
9
- templateFile: 'test-templates/nested/parent-one-child.json',
10
+ templateFile: path.join(__dirname, 'test-templates/nested/parent-one-child.json'),
10
11
  loadNestedStacks: {
11
12
  ChildStack: {
12
- templateFile: 'test-templates/nested/grandchild-import-stack.json',
13
+ templateFile: path.join(__dirname, 'test-templates/nested/grandchild-import-stack.json'),
13
14
  },
14
15
  },
15
16
  });
@@ -1,13 +1,14 @@
1
1
  import * as core from 'aws-cdk-lib';
2
2
  import * as inc from 'aws-cdk-lib/cloudformation-include';
3
3
  import * as integ from '@aws-cdk/integ-tests-alpha';
4
+ import * as path from 'path';
4
5
 
5
6
  const app = new core.App();
6
7
 
7
8
  const stack = new core.Stack(app, 'Stack');
8
9
 
9
10
  new inc.CfnInclude(stack, 'Stack', {
10
- templateFile: 'test-templates/tags-with-intrinsics.json',
11
+ templateFile: path.join(__dirname, 'test-templates/tags-with-intrinsics.json'),
11
12
  });
12
13
 
13
14
  new integ.IntegTest(app, 'ResourceTagIntrinsicStack', {
@@ -5,6 +5,7 @@ import { App, Duration, Stack } from 'aws-cdk-lib';
5
5
  import * as integ from '@aws-cdk/integ-tests-alpha';
6
6
  import * as triggers from 'aws-cdk-lib/triggers';
7
7
  import { STANDARD_NODEJS_RUNTIME } from '../../config';
8
+ import * as path from 'path';
8
9
 
9
10
  const app = new App({
10
11
  postCliContext: {
@@ -45,7 +46,7 @@ const funcWithAssertion = new lambda.Function(stack, 'MyAssertionLambdaFunction'
45
46
  runtime: STANDARD_NODEJS_RUNTIME,
46
47
  handler: 'index.handler',
47
48
  timeout: Duration.minutes(15),
48
- code: lambda.Code.fromAsset('lib'),
49
+ code: lambda.Code.fromAsset(path.join(__dirname, 'lib')),
49
50
  environment: {
50
51
  QUEUE_URL: assertionQueue.queueUrl,
51
52
  },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: konokenj.cdk-api-mcp-server
3
- Version: 0.56.0
3
+ Version: 0.58.0
4
4
  Summary: An MCP server provides AWS CDK API Reference
5
5
  Project-URL: Documentation, https://github.com/konokenj/cdk-api-mcp-server#readme
6
6
  Project-URL: Issues, https://github.com/konokenj/cdk-api-mcp-server/issues
@@ -26,7 +26,7 @@ Description-Content-Type: text/markdown
26
26
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/konokenj.cdk-api-mcp-server.svg)](https://pypi.org/project/konokenj.cdk-api-mcp-server)
27
27
 
28
28
  <!-- DEP-VERSIONS-START -->
29
- [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.225.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
29
+ [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.227.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
30
30
  <!-- DEP-VERSIONS-END -->
31
31
 
32
32
  ---