@aws/agentcore-cdk 0.1.0-alpha.5 → 0.1.0-alpha.6

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 (52) hide show
  1. package/dist/cdk/constructs/components/mcp/{McpGateway.d.ts → Gateway.d.ts} +4 -4
  2. package/dist/cdk/constructs/components/mcp/Gateway.d.ts.map +1 -0
  3. package/dist/cdk/constructs/components/mcp/{McpGateway.js → Gateway.js} +164 -13
  4. package/dist/cdk/constructs/components/mcp/Gateway.js.map +1 -0
  5. package/dist/cdk/constructs/components/mcp/index.d.ts +1 -1
  6. package/dist/cdk/constructs/components/mcp/index.d.ts.map +1 -1
  7. package/dist/cdk/constructs/components/mcp/index.js +3 -3
  8. package/dist/cdk/constructs/components/mcp/index.js.map +1 -1
  9. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts +46 -0
  10. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts.map +1 -0
  11. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js +49 -0
  12. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js.map +1 -0
  13. package/dist/cdk/constructs/components/primitives/index.d.ts +1 -0
  14. package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -1
  15. package/dist/cdk/constructs/components/primitives/index.js +3 -1
  16. package/dist/cdk/constructs/components/primitives/index.js.map +1 -1
  17. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts +10 -2
  18. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -1
  19. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +24 -28
  20. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -1
  21. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -1
  22. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +3 -12
  23. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -1
  24. package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +2 -1
  25. package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
  26. package/dist/cdk/constructs/l3/AgentCoreApplication.js +17 -3
  27. package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
  28. package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts +1 -1
  29. package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +1 -1
  30. package/dist/cdk/constructs/l3/AgentCoreMcp.js +3 -3
  31. package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +1 -1
  32. package/dist/schema/constants.d.ts +1 -1
  33. package/dist/schema/constants.d.ts.map +1 -1
  34. package/dist/schema/constants.js +1 -1
  35. package/dist/schema/constants.js.map +1 -1
  36. package/dist/schema/schemas/agent-env.d.ts +1 -14
  37. package/dist/schema/schemas/agent-env.d.ts.map +1 -1
  38. package/dist/schema/schemas/agent-env.js +3 -32
  39. package/dist/schema/schemas/agent-env.js.map +1 -1
  40. package/dist/schema/schemas/agentcore-project.d.ts +1 -5
  41. package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
  42. package/dist/schema/schemas/deployed-state.d.ts +21 -0
  43. package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
  44. package/dist/schema/schemas/deployed-state.js +9 -1
  45. package/dist/schema/schemas/deployed-state.js.map +1 -1
  46. package/dist/schema/schemas/mcp.d.ts +281 -9
  47. package/dist/schema/schemas/mcp.d.ts.map +1 -1
  48. package/dist/schema/schemas/mcp.js +254 -7
  49. package/dist/schema/schemas/mcp.js.map +1 -1
  50. package/package.json +11 -3
  51. package/dist/cdk/constructs/components/mcp/McpGateway.d.ts.map +0 -1
  52. package/dist/cdk/constructs/components/mcp/McpGateway.js.map +0 -1
@@ -8,7 +8,7 @@ export type CredentialDeployedState = Record<string, {
8
8
  credentialProviderArn: string;
9
9
  clientSecretArn?: string;
10
10
  }>;
11
- export interface McpGatewayProps extends AgentCoreComponentProps {
11
+ export interface GatewayProps extends AgentCoreComponentProps {
12
12
  /** Gateway configuration from schema */
13
13
  readonly gateway: AgentCoreGateway;
14
14
  /** Config root directory for resolving paths */
@@ -25,13 +25,13 @@ export interface McpGatewayProps extends AgentCoreComponentProps {
25
25
  * - Gateway targets (Lambda or AgentCoreRuntime backed)
26
26
  * - Proper IAM grants between gateway and compute
27
27
  */
28
- export declare class McpGateway extends Construct {
28
+ export declare class Gateway extends Construct {
29
29
  readonly cfnGateway: bedrockagentcore.CfnGateway;
30
30
  readonly role: iam.Role;
31
31
  readonly runtimes: Map<string, AgentCoreRuntime>;
32
32
  readonly lambdaFunctions: Map<string, cdk.aws_lambda.Function>;
33
33
  private readonly credentials?;
34
- constructor(scope: Construct, id: string, props: McpGatewayProps);
34
+ constructor(scope: Construct, id: string, props: GatewayProps);
35
35
  /**
36
36
  * Builds the authorizer configuration for a gateway.
37
37
  * URL format is validated at schema level via OidcDiscoveryUrlSchema.
@@ -46,4 +46,4 @@ export declare class McpGateway extends Construct {
46
46
  */
47
47
  private createGatewayTarget;
48
48
  }
49
- //# sourceMappingURL=McpGateway.d.ts.map
49
+ //# sourceMappingURL=Gateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateway.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/Gateway.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AAInF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,oBAAoB,IAAI,gBAAgB,EAAE,OAAO,IAAI,GAAG,EAAwB,MAAM,aAAa,CAAC;AAE7G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,qBAAqB,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElH,MAAM,WAAW,YAAa,SAAQ,uBAAuB;IAC3D,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,uBAAuB,CAAC;CAChD;AAED;;;;;;;;GAQG;AACH,qBAAa,OAAQ,SAAQ,SAAS;IACpC,SAAgB,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC;IACxD,SAAgB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;IAC/B,SAAgB,QAAQ,gCAAuC;IAC/D,SAAgB,eAAe,uCAAsC;IAErE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAA0B;gBAE3C,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;IAqG7D;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAoBpC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA+C7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAkR5B"}
@@ -33,14 +33,18 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.McpGateway = void 0;
36
+ exports.Gateway = void 0;
37
+ const lib_1 = require("../../../../lib");
38
+ const schema_1 = require("../../../../schema");
37
39
  const constants_1 = require("../../../constants");
38
40
  const logical_ids_1 = require("../../../logical-ids");
39
41
  const McpLambdaCompute_1 = require("./McpLambdaCompute");
40
42
  const McpRuntimeCompute_1 = require("./McpRuntimeCompute");
41
43
  const cdk = __importStar(require("aws-cdk-lib"));
42
44
  const aws_cdk_lib_1 = require("aws-cdk-lib");
45
+ const aws_s3_assets_1 = require("aws-cdk-lib/aws-s3-assets");
43
46
  const constructs_1 = require("constructs");
47
+ const path_1 = require("path");
44
48
  /**
45
49
  * Creates an MCP Gateway with its associated targets and compute.
46
50
  *
@@ -50,7 +54,7 @@ const constructs_1 = require("constructs");
50
54
  * - Gateway targets (Lambda or AgentCoreRuntime backed)
51
55
  * - Proper IAM grants between gateway and compute
52
56
  */
53
- class McpGateway extends constructs_1.Construct {
57
+ class Gateway extends constructs_1.Construct {
54
58
  cfnGateway;
55
59
  role;
56
60
  runtimes = new Map();
@@ -112,15 +116,25 @@ class McpGateway extends constructs_1.Construct {
112
116
  }
113
117
  }
114
118
  if (apiKeyTargets.length > 0) {
115
- const secretArns = apiKeyTargets
116
- .map(t => this.credentials?.[t.outboundAuth.credentialName]?.clientSecretArn)
117
- .filter((arn) => !!arn);
118
- if (secretArns.length > 0) {
119
- this.role.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
120
- actions: ['secretsmanager:GetSecretValue'],
121
- resources: secretArns,
122
- }));
123
- }
119
+ const stack = cdk.Stack.of(this);
120
+ // Grant permissions to retrieve API key credentials from AgentCore Identity
121
+ this.role.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
122
+ actions: [
123
+ 'bedrock-agentcore:GetApiKeyCredential',
124
+ 'bedrock-agentcore:GetResourceApiKey',
125
+ 'bedrock-agentcore:GetWorkloadAccessToken',
126
+ ],
127
+ resources: [
128
+ `arn:aws:bedrock-agentcore:${stack.region}:${stack.account}:workload-identity-directory/*`,
129
+ `arn:aws:bedrock-agentcore:${stack.region}:${stack.account}:token-vault/*`,
130
+ `arn:aws:bedrock-agentcore:${stack.region}:${stack.account}:apikeycredentialprovider/*`,
131
+ ],
132
+ }));
133
+ // Grant Secrets Manager access for the underlying API key secrets
134
+ this.role.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
135
+ actions: ['secretsmanager:GetSecretValue'],
136
+ resources: [`arn:aws:secretsmanager:${stack.region}:${stack.account}:secret:bedrock-agentcore-identity!*`],
137
+ }));
124
138
  }
125
139
  }
126
140
  /**
@@ -175,6 +189,7 @@ class McpGateway extends constructs_1.Construct {
175
189
  apiKeyCredentialProvider: {
176
190
  providerArn: credential.credentialProviderArn,
177
191
  credentialLocation: 'HEADER',
192
+ credentialParameterName: 'x-api-key',
178
193
  },
179
194
  },
180
195
  },
@@ -187,6 +202,88 @@ class McpGateway extends constructs_1.Construct {
187
202
  */
188
203
  createGatewayTarget(target, projectName, configRoot) {
189
204
  const targetName = target.name;
205
+ // Handle API Gateway targets (no compute required)
206
+ if (target.targetType === 'apiGateway' && target.apiGateway) {
207
+ const { restApiId, stage, apiGatewayToolConfiguration } = target.apiGateway;
208
+ const credentialProviderConfigurations = this.buildCredentialConfig(target);
209
+ // Grant execute-api:Invoke only when the gateway uses SigV4 (IAM/NONE auth).
210
+ // API_KEY auth sends the key in a header and doesn't need IAM-level invoke permission.
211
+ // When adding new auth types, consider whether the gateway SigV4-signs the request —
212
+ // if it does, execute-api:Invoke is required; if it uses a different auth mechanism, it's not.
213
+ if (!credentialProviderConfigurations) {
214
+ const apiGatewayArn = `arn:aws:execute-api:${cdk.Stack.of(this).region}:${cdk.Stack.of(this).account}:${restApiId}/${stage}/*`;
215
+ this.role.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
216
+ actions: ['execute-api:Invoke'],
217
+ resources: [apiGatewayArn],
218
+ }));
219
+ }
220
+ new aws_cdk_lib_1.aws_bedrockagentcore.CfnGatewayTarget(this, (0, logical_ids_1.toPascalId)('Target', targetName), {
221
+ gatewayIdentifier: this.cfnGateway.attrGatewayIdentifier,
222
+ name: targetName,
223
+ description: `API Gateway target: ${targetName}`,
224
+ targetConfiguration: {
225
+ mcp: {
226
+ apiGateway: {
227
+ restApiId,
228
+ stage,
229
+ apiGatewayToolConfiguration: {
230
+ toolFilters: apiGatewayToolConfiguration.toolFilters.map(f => ({
231
+ filterPath: f.filterPath,
232
+ methods: f.methods,
233
+ })),
234
+ ...(apiGatewayToolConfiguration.toolOverrides && {
235
+ toolOverrides: apiGatewayToolConfiguration.toolOverrides.map(o => ({
236
+ name: o.name,
237
+ path: o.path,
238
+ method: o.method,
239
+ ...(o.description && { description: o.description }),
240
+ })),
241
+ }),
242
+ },
243
+ },
244
+ },
245
+ },
246
+ credentialProviderConfigurations: credentialProviderConfigurations ??
247
+ (schema_1.TARGET_TYPE_AUTH_CONFIG.apiGateway.iamRoleFallback
248
+ ? [{ credentialProviderType: 'GATEWAY_IAM_ROLE' }]
249
+ : undefined),
250
+ });
251
+ return;
252
+ }
253
+ // Handle Lambda Function ARN targets (no compute required)
254
+ if (target.targetType === 'lambdaFunctionArn' && target.lambdaFunctionArn) {
255
+ const { lambdaArn, toolSchemaFile } = target.lambdaFunctionArn;
256
+ // Grant the gateway role permission to invoke the Lambda function
257
+ this.role.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
258
+ actions: ['lambda:InvokeFunction'],
259
+ resources: [lambdaArn, `${lambdaArn}:*`],
260
+ }));
261
+ // Upload tool schema file to S3 via CDK Assets
262
+ const resolvedSchemaPath = (0, lib_1.resolveCodeLocation)(toolSchemaFile, configRoot);
263
+ const schemaAsset = new aws_s3_assets_1.Asset(this, (0, logical_ids_1.toPascalId)('Schema', targetName), {
264
+ path: resolvedSchemaPath,
265
+ });
266
+ schemaAsset.grantRead(this.role);
267
+ new aws_cdk_lib_1.aws_bedrockagentcore.CfnGatewayTarget(this, (0, logical_ids_1.toPascalId)('Target', targetName), {
268
+ gatewayIdentifier: this.cfnGateway.attrGatewayIdentifier,
269
+ name: targetName,
270
+ description: `Lambda function target: ${targetName}`,
271
+ targetConfiguration: {
272
+ mcp: {
273
+ lambda: {
274
+ lambdaArn,
275
+ toolSchema: {
276
+ s3: {
277
+ uri: `s3://${schemaAsset.s3BucketName}/${schemaAsset.s3ObjectKey}`,
278
+ },
279
+ },
280
+ },
281
+ },
282
+ },
283
+ credentialProviderConfigurations: [{ credentialProviderType: 'GATEWAY_IAM_ROLE' }],
284
+ });
285
+ return;
286
+ }
190
287
  // Handle external MCP server endpoints (no compute required)
191
288
  if (target.targetType === 'mcpServer' && target.endpoint && !target.compute) {
192
289
  const credentialProviderConfigurations = this.buildCredentialConfig(target);
@@ -203,6 +300,60 @@ class McpGateway extends constructs_1.Construct {
203
300
  });
204
301
  return;
205
302
  }
303
+ // Handle OpenAPI / Smithy schema-based targets
304
+ if (target.targetType === 'openApiSchema' || target.targetType === 'smithyModel') {
305
+ if (!target.schemaSource) {
306
+ throw new Error(`Gateway target "${targetName}" of type ${target.targetType} requires a schemaSource.`);
307
+ }
308
+ let schemaConfig;
309
+ if ('s3' in target.schemaSource && target.schemaSource.s3) {
310
+ // User-provided S3 URI — pass directly to CFN
311
+ schemaConfig = {
312
+ s3: {
313
+ uri: target.schemaSource.s3.uri,
314
+ bucketOwnerAccountId: target.schemaSource.s3.bucketOwnerAccountId,
315
+ },
316
+ };
317
+ }
318
+ else if ('inline' in target.schemaSource && target.schemaSource.inline) {
319
+ // Local file — upload via CDK Asset, reference as S3 URI
320
+ // Resolve relative to project root (parent of agentcore/)
321
+ const projectRoot = (0, path_1.dirname)(configRoot);
322
+ const schemaPath = (0, path_1.isAbsolute)(target.schemaSource.inline.path)
323
+ ? target.schemaSource.inline.path
324
+ : (0, path_1.join)(projectRoot, target.schemaSource.inline.path);
325
+ const schemaAsset = new aws_s3_assets_1.Asset(this, (0, logical_ids_1.toPascalId)('SchemaAsset', targetName), {
326
+ path: schemaPath,
327
+ });
328
+ schemaAsset.grantRead(this.role);
329
+ schemaConfig = {
330
+ s3: { uri: `s3://${schemaAsset.s3BucketName}/${schemaAsset.s3ObjectKey}` },
331
+ };
332
+ }
333
+ else {
334
+ throw new Error(`Invalid schemaSource for target "${targetName}".`);
335
+ }
336
+ const credentialProviderConfigurations = this.buildCredentialConfig(target);
337
+ const targetConfiguration = {
338
+ mcp: target.targetType === 'openApiSchema' ? { openApiSchema: schemaConfig } : { smithyModel: schemaConfig },
339
+ };
340
+ const authConfig = schema_1.TARGET_TYPE_AUTH_CONFIG[target.targetType];
341
+ if (authConfig.authRequired && !credentialProviderConfigurations) {
342
+ throw new Error(`Target "${targetName}" of type ${target.targetType} requires outbound auth ` +
343
+ `(${authConfig.validAuthTypes.join(' or ')}). ` +
344
+ `Register a credential with 'agentcore add identity' and reference it via outboundAuth.`);
345
+ }
346
+ const gatewayTarget = new aws_cdk_lib_1.aws_bedrockagentcore.CfnGatewayTarget(this, (0, logical_ids_1.toPascalId)('Target', targetName), {
347
+ gatewayIdentifier: this.cfnGateway.attrGatewayIdentifier,
348
+ name: targetName,
349
+ description: `${target.targetType} target: ${targetName}`,
350
+ targetConfiguration,
351
+ credentialProviderConfigurations: credentialProviderConfigurations ??
352
+ (authConfig.iamRoleFallback ? [{ credentialProviderType: 'GATEWAY_IAM_ROLE' }] : undefined),
353
+ });
354
+ gatewayTarget.node.addDependency(this.role);
355
+ return;
356
+ }
206
357
  if (!target.compute) {
207
358
  throw new Error(`Gateway target "${targetName}" must specify compute configuration. ` +
208
359
  `Supported compute hosts: Lambda, AgentCoreRuntime`);
@@ -284,5 +435,5 @@ class McpGateway extends constructs_1.Construct {
284
435
  gatewayTarget.node.addDependency(this.role);
285
436
  }
286
437
  }
287
- exports.McpGateway = McpGateway;
288
- //# sourceMappingURL=McpGateway.js.map
438
+ exports.Gateway = Gateway;
439
+ //# sourceMappingURL=Gateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gateway.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/Gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAsD;AAEtD,+CAA6D;AAC7D,kDAAiE;AACjE,sDAAkD;AAGlD,yDAAsD;AACtD,2DAAwD;AACxD,iDAAmC;AACnC,6CAA6G;AAC7G,6DAAkD;AAClD,2CAAuC;AACvC,+BAAiD;AAajD;;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from './McpGateway';
1
+ export { Gateway, type GatewayProps, type CredentialDeployedState } from './Gateway';
2
2
  export { McpLambdaCompute, type McpLambdaComputeProps } from './McpLambdaCompute';
3
3
  export { McpRuntimeCompute, type McpRuntimeComputeProps } from './McpRuntimeCompute';
4
4
  export { DEFAULT_MCP_PYTHON_VERSION, RUNTIME_ENDPOINT_URL_TEMPLATE, getRuntimeEndpointUrl, mapNodeRuntime, mapPythonRuntime, urlEncodeArn, } from './mcp-utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,aAAa,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.urlEncodeArn = exports.mapPythonRuntime = exports.mapNodeRuntime = exports.getRuntimeEndpointUrl = exports.RUNTIME_ENDPOINT_URL_TEMPLATE = exports.DEFAULT_MCP_PYTHON_VERSION = exports.McpRuntimeCompute = exports.McpLambdaCompute = exports.McpGateway = void 0;
4
- var McpGateway_1 = require("./McpGateway");
5
- Object.defineProperty(exports, "McpGateway", { enumerable: true, get: function () { return McpGateway_1.McpGateway; } });
3
+ exports.urlEncodeArn = exports.mapPythonRuntime = exports.mapNodeRuntime = exports.getRuntimeEndpointUrl = exports.RUNTIME_ENDPOINT_URL_TEMPLATE = exports.DEFAULT_MCP_PYTHON_VERSION = exports.McpRuntimeCompute = exports.McpLambdaCompute = exports.Gateway = void 0;
4
+ var Gateway_1 = require("./Gateway");
5
+ Object.defineProperty(exports, "Gateway", { enumerable: true, get: function () { return Gateway_1.Gateway; } });
6
6
  var McpLambdaCompute_1 = require("./McpLambdaCompute");
7
7
  Object.defineProperty(exports, "McpLambdaCompute", { enumerable: true, get: function () { return McpLambdaCompute_1.McpLambdaCompute; } });
8
8
  var McpRuntimeCompute_1 = require("./McpRuntimeCompute");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/index.ts"],"names":[],"mappings":";;;AAAA,2CAA8F;AAArF,wGAAA,UAAU,OAAA;AACnB,uDAAkF;AAAzE,oHAAA,gBAAgB,OAAA;AACzB,yDAAqF;AAA5E,sHAAA,iBAAiB,OAAA;AAC1B,yCAOqB;AANnB,uHAAA,0BAA0B,OAAA;AAC1B,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAChB,yGAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/mcp/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqF;AAA5E,kGAAA,OAAO,OAAA;AAChB,uDAAkF;AAAzE,oHAAA,gBAAgB,OAAA;AACzB,yDAAqF;AAA5E,sHAAA,iBAAiB,OAAA;AAC1B,yCAOqB;AANnB,uHAAA,0BAA0B,OAAA;AAC1B,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAChB,yGAAA,YAAY,OAAA"}
@@ -0,0 +1,46 @@
1
+ import type { AgentCoreComponentProps } from '../base-props';
2
+ import type { AgentCoreRuntime } from './runtime/AgentCoreRuntime';
3
+ import { aws_iam as iam } from 'aws-cdk-lib';
4
+ import { Construct } from 'constructs';
5
+ export interface BasePrimitiveConstructProps extends AgentCoreComponentProps {
6
+ /**
7
+ * The name of this primitive resource.
8
+ */
9
+ readonly name: string;
10
+ /**
11
+ * Optional description for the IAM execution role.
12
+ */
13
+ readonly roleDescription?: string;
14
+ }
15
+ /**
16
+ * Abstract base class for AgentCore primitive CDK constructs.
17
+ * Provides shared IAM role creation and grant helpers.
18
+ */
19
+ export declare abstract class BasePrimitiveConstruct extends Construct {
20
+ /** The IAM execution role for this primitive */
21
+ protected readonly role: iam.Role;
22
+ /** The physical name: ${projectName}_${name} */
23
+ protected readonly physicalName: string;
24
+ constructor(scope: Construct, id: string, props: BasePrimitiveConstructProps);
25
+ /**
26
+ * Grant permissions to a runtime. Each primitive defines its own grant logic.
27
+ */
28
+ abstract grant(runtime: AgentCoreRuntime): void;
29
+ /**
30
+ * Get the environment variable name for this primitive.
31
+ */
32
+ abstract getEnvVarName(): string;
33
+ /**
34
+ * Get the environment variable value for this primitive.
35
+ */
36
+ abstract getEnvVarValue(): string;
37
+ /**
38
+ * Grant specific actions on an ARN to a runtime.
39
+ */
40
+ protected grantActions(runtime: AgentCoreRuntime, actions: string[], arn: string): void;
41
+ /**
42
+ * Grant specific actions with a condition key to a runtime.
43
+ */
44
+ protected grantActionsWithCondition(runtime: AgentCoreRuntime, actions: string[], arn: string, conditionKey: string, values: string[]): void;
45
+ }
46
+ //# sourceMappingURL=BasePrimitiveConstruct.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasePrimitiveConstruct.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/BasePrimitiveConstruct.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,SAAS;IAC5D,gDAAgD;IAChD,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;IAElC,gDAAgD;IAChD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAE5B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,2BAA2B;IAW5E;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAE/C;;OAEG;IACH,QAAQ,CAAC,aAAa,IAAI,MAAM;IAEhC;;OAEG;IACH,QAAQ,CAAC,cAAc,IAAI,MAAM;IAEjC;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IASvF;;OAEG;IACH,SAAS,CAAC,yBAAyB,CACjC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EAAE,GACf,IAAI;CAaR"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BasePrimitiveConstruct = void 0;
4
+ const constants_1 = require("../../../constants");
5
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
6
+ const constructs_1 = require("constructs");
7
+ /**
8
+ * Abstract base class for AgentCore primitive CDK constructs.
9
+ * Provides shared IAM role creation and grant helpers.
10
+ */
11
+ class BasePrimitiveConstruct extends constructs_1.Construct {
12
+ /** The IAM execution role for this primitive */
13
+ role;
14
+ /** The physical name: ${projectName}_${name} */
15
+ physicalName;
16
+ constructor(scope, id, props) {
17
+ super(scope, id);
18
+ this.physicalName = `${props.projectName}_${props.name}`;
19
+ this.role = new aws_cdk_lib_1.aws_iam.Role(this, 'ExecutionRole', {
20
+ assumedBy: new aws_cdk_lib_1.aws_iam.ServicePrincipal(constants_1.AGENTCORE_SERVICE_PRINCIPAL),
21
+ description: props.roleDescription ?? `AgentCore ${props.name} execution role`,
22
+ });
23
+ }
24
+ /**
25
+ * Grant specific actions on an ARN to a runtime.
26
+ */
27
+ grantActions(runtime, actions, arn) {
28
+ runtime.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
29
+ actions,
30
+ resources: [arn],
31
+ }));
32
+ }
33
+ /**
34
+ * Grant specific actions with a condition key to a runtime.
35
+ */
36
+ grantActionsWithCondition(runtime, actions, arn, conditionKey, values) {
37
+ runtime.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
38
+ actions,
39
+ resources: [arn],
40
+ conditions: {
41
+ StringLike: {
42
+ [conditionKey]: values,
43
+ },
44
+ },
45
+ }));
46
+ }
47
+ }
48
+ exports.BasePrimitiveConstruct = BasePrimitiveConstruct;
49
+ //# sourceMappingURL=BasePrimitiveConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasePrimitiveConstruct.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/BasePrimitiveConstruct.ts"],"names":[],"mappings":";;;AAAA,kDAAiE;AAGjE,6CAA6C;AAC7C,2CAAuC;AAcvC;;;GAGG;AACH,MAAsB,sBAAuB,SAAQ,sBAAS;IAC5D,gDAAgD;IAC7B,IAAI,CAAW;IAElC,gDAAgD;IAC7B,YAAY,CAAS;IAExC,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAkC;QAC1E,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,GAAG,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAG,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE;YAC9C,SAAS,EAAE,IAAI,qBAAG,CAAC,gBAAgB,CAAC,uCAA2B,CAAC;YAChE,WAAW,EAAE,KAAK,CAAC,eAAe,IAAI,aAAa,KAAK,CAAC,IAAI,iBAAiB;SAC/E,CAAC,CAAC;IACL,CAAC;IAiBD;;OAEG;IACO,YAAY,CAAC,OAAyB,EAAE,OAAiB,EAAE,GAAW;QAC9E,OAAO,CAAC,WAAW,CACjB,IAAI,qBAAG,CAAC,eAAe,CAAC;YACtB,OAAO;YACP,SAAS,EAAE,CAAC,GAAG,CAAC;SACjB,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;OAEG;IACO,yBAAyB,CACjC,OAAyB,EACzB,OAAiB,EACjB,GAAW,EACX,YAAoB,EACpB,MAAgB;QAEhB,OAAO,CAAC,WAAW,CACjB,IAAI,qBAAG,CAAC,eAAe,CAAC;YACtB,OAAO;YACP,SAAS,EAAE,CAAC,GAAG,CAAC;YAChB,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,CAAC,YAAY,CAAC,EAAE,MAAM;iBACvB;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAnED,wDAmEC"}
@@ -1,3 +1,4 @@
1
+ export { BasePrimitiveConstruct, type BasePrimitiveConstructProps } from './BasePrimitiveConstruct';
1
2
  export { AgentCoreMemory, type AgentCoreMemoryProps } from './memory';
2
3
  export { AgentCoreRuntime, type AgentCoreRuntimeProps } from './runtime';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgentCoreRuntime = exports.AgentCoreMemory = void 0;
3
+ exports.AgentCoreRuntime = exports.AgentCoreMemory = exports.BasePrimitiveConstruct = void 0;
4
+ var BasePrimitiveConstruct_1 = require("./BasePrimitiveConstruct");
5
+ Object.defineProperty(exports, "BasePrimitiveConstruct", { enumerable: true, get: function () { return BasePrimitiveConstruct_1.BasePrimitiveConstruct; } });
4
6
  var memory_1 = require("./memory");
5
7
  Object.defineProperty(exports, "AgentCoreMemory", { enumerable: true, get: function () { return memory_1.AgentCoreMemory; } });
6
8
  var runtime_1 = require("./runtime");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/index.ts"],"names":[],"mappings":";;;AAAA,mCAAsE;AAA7D,yGAAA,eAAe,OAAA;AACxB,qCAAyE;AAAhE,2GAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/primitives/index.ts"],"names":[],"mappings":";;;AAAA,mEAAoG;AAA3F,gIAAA,sBAAsB,OAAA;AAC/B,mCAAsE;AAA7D,yGAAA,eAAe,OAAA;AACxB,qCAAyE;AAAhE,2GAAA,gBAAgB,OAAA"}
@@ -1,5 +1,6 @@
1
1
  import type { Access, Memory } from '../../../../../schema';
2
2
  import type { AgentCoreComponentProps } from '../../base-props';
3
+ import { BasePrimitiveConstruct } from '../BasePrimitiveConstruct';
3
4
  import type { AgentCoreRuntime } from '../runtime/AgentCoreRuntime';
4
5
  import { Construct } from 'constructs';
5
6
  export interface AgentCoreMemoryProps extends AgentCoreComponentProps {
@@ -24,12 +25,11 @@ export interface AgentCoreMemoryProps extends AgentCoreComponentProps {
24
25
  * - USER_PREFERENCE -> userPreferenceMemoryStrategy
25
26
  * - CUSTOM -> customMemoryStrategy
26
27
  */
27
- export declare class AgentCoreMemory extends Construct {
28
+ export declare class AgentCoreMemory extends BasePrimitiveConstruct {
28
29
  readonly memoryId: string;
29
30
  readonly memoryArn: string;
30
31
  readonly memoryName: string;
31
32
  private readonly cfnMemory;
32
- private readonly role;
33
33
  private readonly memoryConfig;
34
34
  constructor(scope: Construct, id: string, props: AgentCoreMemoryProps);
35
35
  /**
@@ -50,6 +50,14 @@ export declare class AgentCoreMemory extends Construct {
50
50
  * @param namespaces - Specific namespaces to scope access to (optional)
51
51
  */
52
52
  grantWithAccess(runtime: AgentCoreRuntime, access?: Access, namespaces?: string[]): void;
53
+ /**
54
+ * Get the environment variable name for this primitive.
55
+ */
56
+ getEnvVarName(): string;
57
+ /**
58
+ * Get the environment variable value for this primitive.
59
+ */
60
+ getEnvVarValue(): string;
53
61
  /**
54
62
  * Internal method to grant permissions with specified access and optional namespace scoping.
55
63
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AgentCoreMemory.d.ts","sourceRoot":"","sources":["../../../../../../src/cdk/constructs/components/primitives/memory/AgentCoreMemory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAgCvC,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAW;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAE1B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB;IAmErE;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;OAGG;IACI,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAI7C;;;;;OAKG;IACI,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAE,MAAoB,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;IAI5G;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;CAqCpB"}
1
+ {"version":3,"file":"AgentCoreMemory.d.ts","sourceRoot":"","sources":["../../../../../../src/cdk/constructs/components/primitives/memory/AgentCoreMemory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAgCvC,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,eAAgB,SAAQ,sBAAsB;IACzD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAE1B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB;IAkErE;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;OAGG;IACI,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAI7C;;;;;OAKG;IACI,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAE,MAAoB,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;IAI5G;;OAEG;IACI,aAAa,IAAI,MAAM;IAI9B;;OAEG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;CAuBpB"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentCoreMemory = void 0;
4
- const constants_1 = require("../../../../constants");
4
+ const BasePrimitiveConstruct_1 = require("../BasePrimitiveConstruct");
5
5
  const aws_cdk_lib_1 = require("aws-cdk-lib");
6
- const constructs_1 = require("constructs");
7
6
  /**
8
7
  * Memory IAM actions that support the bedrock-agentcore:namespace condition key.
9
8
  * These actions can be scoped to specific namespaces for fine-grained access control.
@@ -47,22 +46,21 @@ const WRITE_ACTIONS = [
47
46
  * - USER_PREFERENCE -> userPreferenceMemoryStrategy
48
47
  * - CUSTOM -> customMemoryStrategy
49
48
  */
50
- class AgentCoreMemory extends constructs_1.Construct {
49
+ class AgentCoreMemory extends BasePrimitiveConstruct_1.BasePrimitiveConstruct {
51
50
  memoryId;
52
51
  memoryArn;
53
52
  memoryName;
54
53
  cfnMemory;
55
- role;
56
54
  memoryConfig;
57
55
  constructor(scope, id, props) {
58
- super(scope, id);
59
- const { projectName, memory } = props;
60
- this.memoryConfig = memory;
61
- this.memoryName = `${projectName}_${memory.name}`;
62
- this.role = new aws_cdk_lib_1.aws_iam.Role(this, 'ExecutionRole', {
63
- assumedBy: new aws_cdk_lib_1.aws_iam.ServicePrincipal(constants_1.AGENTCORE_SERVICE_PRINCIPAL),
64
- description: 'AgentCore Memory execution role',
56
+ super(scope, id, {
57
+ projectName: props.projectName,
58
+ name: props.memory.name,
59
+ roleDescription: 'AgentCore Memory execution role',
65
60
  });
61
+ const { memory } = props;
62
+ this.memoryConfig = memory;
63
+ this.memoryName = this.physicalName;
66
64
  // Map memory strategies to CloudFormation format
67
65
  // CloudFormation MemoryStrategyProperty has optional properties for each strategy type
68
66
  // Each strategy in the array should be a single object with one property set
@@ -147,6 +145,18 @@ class AgentCoreMemory extends constructs_1.Construct {
147
145
  grantWithAccess(runtime, access = 'readwrite', namespaces) {
148
146
  this.grantAccess(runtime, access, namespaces);
149
147
  }
148
+ /**
149
+ * Get the environment variable name for this primitive.
150
+ */
151
+ getEnvVarName() {
152
+ return `MEMORY_${this.memoryConfig.name.toUpperCase()}_ID`;
153
+ }
154
+ /**
155
+ * Get the environment variable value for this primitive.
156
+ */
157
+ getEnvVarValue() {
158
+ return this.memoryId;
159
+ }
150
160
  /**
151
161
  * Internal method to grant permissions with specified access and optional namespace scoping.
152
162
  *
@@ -163,28 +173,14 @@ class AgentCoreMemory extends constructs_1.Construct {
163
173
  // These are read actions, so always included regardless of access level
164
174
  if (namespaces && namespaces.length > 0) {
165
175
  // Scope to specific namespaces
166
- runtime.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
167
- actions: NAMESPACE_SCOPED_ACTIONS,
168
- resources: [this.memoryArn],
169
- conditions: {
170
- StringLike: {
171
- 'bedrock-agentcore:namespace': namespaces,
172
- },
173
- },
174
- }));
176
+ this.grantActionsWithCondition(runtime, NAMESPACE_SCOPED_ACTIONS, this.memoryArn, 'bedrock-agentcore:namespace', namespaces);
175
177
  }
176
178
  else {
177
179
  // No namespace restriction
178
- runtime.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
179
- actions: NAMESPACE_SCOPED_ACTIONS,
180
- resources: [this.memoryArn],
181
- }));
180
+ this.grantActions(runtime, NAMESPACE_SCOPED_ACTIONS, this.memoryArn);
182
181
  }
183
182
  // Grant non-namespace actions (no condition support)
184
- runtime.addToPolicy(new aws_cdk_lib_1.aws_iam.PolicyStatement({
185
- actions: nonNamespaceActions,
186
- resources: [this.memoryArn],
187
- }));
183
+ this.grantActions(runtime, nonNamespaceActions, this.memoryArn);
188
184
  }
189
185
  }
190
186
  exports.AgentCoreMemory = AgentCoreMemory;
@@ -1 +1 @@
1
- {"version":3,"file":"AgentCoreMemory.js","sourceRoot":"","sources":["../../../../../../src/cdk/constructs/components/primitives/memory/AgentCoreMemory.ts"],"names":[],"mappings":";;;AACA,qDAAoE;AAGpE,6CAAuF;AACvF,2CAAuC;AAEvC;;;;GAIG;AACH,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AAC,CAAC,CAAC,CAAC,GAAG,YAAY,EAAE,GAAG,aAAa,CAAC,CAAC;QAEnG,4EAA4E;QAC5E,wEAAwE;QACxE,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,+BAA+B;YAC/B,OAAO,CAAC,WAAW,CACjB,IAAI,qBAAG,CAAC,eAAe,CAAC;gBACtB,OAAO,EAAE,wBAAwB;gBACjC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;gBAC3B,UAAU,EAAE;oBACV,UAAU,EAAE;wBACV,6BAA6B,EAAE,UAAU;qBAC1C;iBACF;aACF,CAAC,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,2BAA2B;YAC3B,OAAO,CAAC,WAAW,CACjB,IAAI,qBAAG,CAAC,eAAe,CAAC;gBACtB,OAAO,EAAE,wBAAwB;gBACjC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;aAC5B,CAAC,CACH,CAAC;QACJ,CAAC;QAED,qDAAqD;QACrD,OAAO,CAAC,WAAW,CACjB,IAAI,qBAAG,CAAC,eAAe,CAAC;YACtB,OAAO,EAAE,mBAAmB;YAC5B,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;SAC5B,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA9JD,0CA8JC"}
1
+ {"version":3,"file":"AgentCoreMemory.js","sourceRoot":"","sources":["../../../../../../src/cdk/constructs/components/primitives/memory/AgentCoreMemory.ts"],"names":[],"mappings":";;;AAEA,sEAAmE;AAEnE,6CAAuE;AAGvE;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAAC,qCAAqC,EAAE,yCAAyC,CAAC,CAAC;AAEpH;;;GAGG;AACH,MAAM,YAAY,GAAG;IACnB,4BAA4B;IAC5B,6BAA6B;IAC7B,mCAAmC;IACnC,8BAA8B;IAC9B,8BAA8B;IAC9B,gCAAgC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,aA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