Skip to content

Commit e7953de

Browse files
committed
update
1 parent 4375dac commit e7953de

File tree

8 files changed

+28
-57
lines changed

8 files changed

+28
-57
lines changed

packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/gateway.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -685,15 +685,12 @@ export class Gateway extends GatewayBase {
685685
* @internal
686686
*/
687687
private createDefaultCognitoAuthorizerConfig(): IGatewayAuthorizerConfig {
688-
// Create User Pool for M2M authentication
689688
const userPool = new cognito.UserPool(this, 'UserPool', {
690-
userPoolName: `${this.name}-gw-userpool`,
691689
signInCaseSensitive: false,
692690
});
693691

694692
const resourceServer = userPool.addResourceServer('ResourceServer', {
695-
identifier: `${this.name}-gateway-resource-server`,
696-
userPoolResourceServerName: `${this.name}-GatewayResourceServer`,
693+
identifier: `${this.name}-resource-server`,
697694
scopes: [
698695
{
699696
scopeName: 'read',
@@ -707,7 +704,6 @@ export class Gateway extends GatewayBase {
707704
});
708705

709706
const userPoolClient = userPool.addClient('DefaultClient', {
710-
userPoolClientName: `${this.name}-gw-client`,
711707
generateSecret: true,
712708
oAuth: {
713709
flows: {
@@ -727,9 +723,8 @@ export class Gateway extends GatewayBase {
727723
});
728724

729725
// Create Cognito Domain for OAuth2 token endpoint
730-
// Use gateway name as domain prefix (already validated to be alphanumeric with hyphens/underscores)
731-
// Replace underscores with hyphens and convert to lowercase for Cognito domain requirements
732-
const domainPrefix = `${this.name}-gw`.replace(/_/g, '-').toLowerCase();
726+
// Convert to lowercase for Cognito domain requirements
727+
const domainPrefix = this.name.toLowerCase();
733728
const userPoolDomain = userPool.addDomain('Domain', {
734729
cognitoDomain: {
735730
domainPrefix: domainPrefix,

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/BedrockAgentCoreRuntimeGatewayIntegTest.assets.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/BedrockAgentCoreRuntimeGatewayIntegTest.template.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"EmailVerificationMessage": "The verification code to your new account is {####}",
118118
"EmailVerificationSubject": "Verify your new account",
119119
"SmsVerificationMessage": "The verification code to your new account is {####}",
120-
"UserPoolName": "integ-test-runtime-gateway-gw-userpool",
121120
"UsernameConfiguration": {
122121
"CaseSensitive": false
123122
},
@@ -134,8 +133,8 @@
134133
"TestGatewayUserPoolResourceServer7A34B6B2": {
135134
"Type": "AWS::Cognito::UserPoolResourceServer",
136135
"Properties": {
137-
"Identifier": "integ-test-runtime-gateway-gateway-resource-server",
138-
"Name": "integ-test-runtime-gateway-GatewayResourceServer",
136+
"Identifier": "integ-test-runtime-gateway-resource-server",
137+
"Name": "integ-test-runtime-gateway-resource-server",
139138
"Scopes": [
140139
{
141140
"ScopeDescription": "Read access to gateway tools",
@@ -182,7 +181,6 @@
182181
]
183182
}
184183
],
185-
"ClientName": "integ-test-runtime-gateway-gw-client",
186184
"GenerateSecret": true,
187185
"SupportedIdentityProviders": [
188186
"COGNITO"
@@ -286,7 +284,7 @@
286284
"TestGatewayUserPoolDomainB64B616E": {
287285
"Type": "AWS::Cognito::UserPoolDomain",
288286
"Properties": {
289-
"Domain": "integ-test-runtime-gateway-gw",
287+
"Domain": "integ-test-runtime-gateway",
290288
"UserPoolId": {
291289
"Ref": "TestGatewayUserPool545AA49A"
292290
}
@@ -321,7 +319,6 @@
321319
}
322320
},
323321
"AuthorizerType": "CUSTOM_JWT",
324-
"Description": "Gateway for Runtime integration test with M2M auth",
325322
"Name": "integ-test-runtime-gateway",
326323
"ProtocolConfiguration": {
327324
"Mcp": {
@@ -420,8 +417,6 @@
420417
"Code": {
421418
"ZipFile": "\n exports.handler = async (event, context) => {\n return {\n statusCode: 200,\n body: JSON.stringify({\n message: 'Hello from Gateway Lambda!',\n timestamp: new Date().toISOString()\n }),\n };\n };\n "
422419
},
423-
"Description": "Simple test function for Gateway M2M authentication test",
424-
"FunctionName": "integ-test-simple-tool",
425420
"Handler": "index.handler",
426421
"Role": {
427422
"Fn::GetAtt": [
@@ -763,7 +758,6 @@
763758
}
764759
},
765760
"AgentRuntimeName": "integ_test_runtime_with_gateway",
766-
"Description": "Runtime using Gateway tools",
767761
"EnvironmentVariables": {
768762
"GATEWAY_URL": {
769763
"Fn::GetAtt": [

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/RuntimeGatewayIntegTestDefaultTestDeployAssert1ACA2D2A.assets.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/RuntimeGatewayIntegTestDefaultTestDeployAssert1ACA2D2A.template.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/manifest.json

Lines changed: 8 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.js.snapshot/tree.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway-with-runtime.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
import * as path from 'path';
21
import { randomUUID } from 'crypto';
2+
import * as path from 'path';
3+
import * as integ from '@aws-cdk/integ-tests-alpha';
34
import * as cdk from 'aws-cdk-lib';
45
import * as lambda from 'aws-cdk-lib/aws-lambda';
5-
import * as integ from '@aws-cdk/integ-tests-alpha';
66
import * as agentcore from '../../../lib';
77

88
const app = new cdk.App();
99
const stack = new cdk.Stack(app, 'BedrockAgentCoreRuntimeGatewayIntegTest', {});
1010

1111
const gateway = new agentcore.Gateway(stack, 'TestGateway', {
1212
gatewayName: 'integ-test-runtime-gateway',
13-
description: 'Gateway for Runtime integration test with M2M auth',
1413
});
1514

1615
const calculatorFunction = new lambda.Function(stack, 'TestFunction', {
17-
functionName: 'integ-test-simple-tool',
1816
runtime: lambda.Runtime.NODEJS_22_X,
1917
handler: 'index.handler',
2018
code: lambda.Code.fromInline(`
@@ -28,7 +26,6 @@ const calculatorFunction = new lambda.Function(stack, 'TestFunction', {
2826
};
2927
};
3028
`),
31-
description: 'Simple test function for Gateway M2M authentication test',
3229
});
3330

3431
const toolSchema = agentcore.ToolSchema.fromInline([
@@ -55,7 +52,6 @@ const runtimeArtifact = agentcore.AgentRuntimeArtifact.fromAsset(
5552

5653
const runtime = new agentcore.Runtime(stack, 'TestRuntime', {
5754
runtimeName: 'integ_test_runtime_with_gateway',
58-
description: 'Runtime using Gateway tools',
5955
agentRuntimeArtifact: runtimeArtifact,
6056
protocolConfiguration: agentcore.ProtocolType.HTTP,
6157
networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingPublicNetwork(),

0 commit comments

Comments
 (0)