Skip to content

Commit 1ade2b0

Browse files
author
Eugene Y. Jen
committed
allow cusomized scopes
2 parents 71d3b26 + 25a6216 commit 1ade2b0

21 files changed

+1691
-82
lines changed

.header.md

Lines changed: 165 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This module simplifies the process of:
4343
```hcl
4444
module "agentcore" {
4545
source = "aws-ia/agentcore/aws"
46-
version = "0.0.2"
46+
version = "0.0.3"
4747
4848
# Enable Agent Core Runtime
4949
create_runtime = true
@@ -68,7 +68,7 @@ module "agentcore" {
6868
```hcl
6969
module "agentcore" {
7070
source = "aws-ia/agentcore/aws"
71-
version = "0.0.2"
71+
version = "0.0.3"
7272
7373
# Enable Agent Core Runtime
7474
create_runtime = true
@@ -94,7 +94,7 @@ module "agentcore" {
9494
```hcl
9595
module "agentcore" {
9696
source = "aws-ia/agentcore/aws"
97-
version = "0.0.2"
97+
version = "0.0.3"
9898
9999
# Enable Agent Core Runtime with custom IAM role
100100
create_runtime = true
@@ -115,7 +115,7 @@ Create and configure an MCP gateway:
115115
```hcl
116116
module "agentcore" {
117117
source = "aws-ia/agentcore/aws"
118-
version = "0.0.2"
118+
version = "0.0.3"
119119
120120
# Enable Agent Core Gateway
121121
create_gateway = true
@@ -157,7 +157,7 @@ The module can automatically create a Cognito User Pool to handle JWT authentica
157157
```hcl
158158
module "agentcore" {
159159
source = "aws-ia/agentcore/aws"
160-
version = "0.0.2"
160+
version = "0.0.3"
161161
162162
# Enable Agent Core Gateway
163163
create_gateway = true
@@ -195,7 +195,7 @@ Below you can find how to configure a simple short-term memory (STM) with no lon
195195
```hcl
196196
module "agentcore" {
197197
source = "aws-ia/agentcore/aws"
198-
version = "0.0.2"
198+
version = "0.0.3"
199199
200200
# Create a basic memory with default settings, no LTM strategies
201201
create_memory = true
@@ -216,7 +216,7 @@ resource "aws_kms_key" "memory_encryption_key" {
216216
217217
module "agentcore" {
218218
source = "aws-ia/agentcore/aws"
219-
version = "0.0.2"
219+
version = "0.0.3"
220220
221221
# Create memory with custom encryption
222222
create_memory = true
@@ -257,7 +257,7 @@ Captures individual preferences, interaction patterns, and personalized settings
257257
```hcl
258258
module "agentcore" {
259259
source = "aws-ia/agentcore/aws"
260-
version = "0.0.2"
260+
version = "0.0.3"
261261
262262
# Create memory with built-in strategies
263263
create_memory = true
@@ -345,7 +345,7 @@ You can customize the namespace (where the memories are stored) by configuring t
345345
```hcl
346346
module "agentcore" {
347347
source = "aws-ia/agentcore/aws"
348-
version = "0.0.2"
348+
version = "0.0.3"
349349
350350
# Enable Agent Core Memory
351351
create_memory = true
@@ -449,7 +449,7 @@ The Browser construct supports the following network modes:
449449
```hcl
450450
module "agentcore" {
451451
source = "aws-ia/agentcore/aws"
452-
version = "0.0.2"
452+
version = "0.0.3"
453453
454454
# Enable Agent Core Browser Custom
455455
create_browser = true
@@ -477,6 +477,160 @@ module "agentcore" {
477477
}
478478
```
479479

480+
### AgentCore Gateway Target
481+
482+
The Amazon Bedrock AgentCore Gateway Target enables you to define the endpoints and configurations that a gateway can invoke, such as Lambda functions or MCP servers. Gateway targets allow agents to interact with external services through the Model Context Protocol (MCP).
483+
484+
```hcl
485+
module "agentcore" {
486+
source = "aws-ia/agentcore/aws"
487+
version = "0.0.3"
488+
489+
# First, create a gateway
490+
create_gateway = true
491+
gateway_name = "MyGateway"
492+
493+
# Then create a gateway target for Lambda
494+
create_gateway_target = true
495+
gateway_target_name = "MyLambdaTarget"
496+
gateway_target_description = "Lambda function target for processing requests"
497+
498+
# Use the gateway's IAM role for authentication
499+
gateway_target_credential_provider_type = "GATEWAY_IAM_ROLE"
500+
501+
# Configure the Lambda target
502+
gateway_target_type = "LAMBDA"
503+
gateway_target_lambda_config = {
504+
lambda_arn = "arn:aws:lambda:us-east-1:123456789012:function:my-function"
505+
tool_schema_type = "INLINE"
506+
inline_schema = {
507+
name = "process_request"
508+
description = "Process incoming requests"
509+
510+
input_schema = {
511+
type = "object"
512+
description = "Request processing schema"
513+
properties = [
514+
{
515+
name = "message"
516+
type = "string"
517+
description = "Message to process"
518+
required = true
519+
},
520+
{
521+
name = "options"
522+
type = "object"
523+
nested_properties = [
524+
{
525+
name = "priority"
526+
type = "string"
527+
}
528+
]
529+
}
530+
]
531+
}
532+
533+
output_schema = {
534+
type = "object"
535+
properties = [
536+
{
537+
name = "status"
538+
type = "string"
539+
required = true
540+
},
541+
{
542+
name = "result"
543+
type = "string"
544+
}
545+
]
546+
}
547+
}
548+
}
549+
}
550+
```
551+
552+
#### Gateway Target with API Key Authentication
553+
554+
```hcl
555+
module "agentcore" {
556+
source = "aws-ia/agentcore/aws"
557+
version = "0.0.3"
558+
559+
# Create a gateway target with API Key authentication
560+
create_gateway_target = true
561+
gateway_target_name = "ApiKeyTarget"
562+
gateway_target_gateway_id = "your-gateway-id" # If using existing gateway
563+
564+
gateway_target_credential_provider_type = "API_KEY"
565+
gateway_target_api_key_config = {
566+
provider_arn = "arn:aws:iam::123456789012:oidc-provider/example.com"
567+
credential_location = "HEADER"
568+
credential_parameter_name = "X-API-Key"
569+
credential_prefix = "Bearer"
570+
}
571+
572+
# Configure Lambda target
573+
gateway_target_type = "LAMBDA"
574+
gateway_target_lambda_config = {
575+
lambda_arn = "arn:aws:lambda:us-east-1:123456789012:function:api-function"
576+
tool_schema_type = "INLINE"
577+
inline_schema = {
578+
name = "api_tool"
579+
description = "External API integration tool"
580+
581+
input_schema = {
582+
type = "string"
583+
description = "Simple string input for API calls"
584+
}
585+
}
586+
}
587+
}
588+
```
589+
590+
#### Gateway Target with MCP Server
591+
592+
```hcl
593+
module "agentcore" {
594+
source = "aws-ia/agentcore/aws"
595+
version = "0.0.3"
596+
597+
# Create a gateway target for an MCP server
598+
create_gateway_target = true
599+
gateway_target_name = "MCPServerTarget"
600+
601+
# Configure MCP Server target
602+
gateway_target_type = "MCP_SERVER"
603+
gateway_target_mcp_server_config = {
604+
endpoint = "https://mcp-server.example.com"
605+
}
606+
}
607+
```
608+
609+
### AgentCore Workload Identity
610+
611+
The Amazon Bedrock AgentCore Workload Identity enables you to manage identity configurations for resources such as AgentCore runtime and AgentCore gateway. Workload identities provide secure access management and OAuth2 integration capabilities for your Bedrock AI applications.
612+
613+
```hcl
614+
module "agentcore" {
615+
source = "aws-ia/agentcore/aws"
616+
version = "0.0.3"
617+
618+
# Enable Workload Identity
619+
create_workload_identity = true
620+
workload_identity_name = "MyWorkloadIdentity"
621+
workload_identity_allowed_resource_oauth_2_return_urls = [
622+
"https://example.com/oauth2/callback",
623+
"https://api.example.com/auth/callback"
624+
]
625+
626+
# Optional: Add tags
627+
workload_identity_tags = {
628+
Environment = "production"
629+
Project = "ai-assistants"
630+
}
631+
}
632+
```
633+
480634
### AgentCore Code Interpreter Custom
481635

482636
The Amazon Bedrock AgentCore Code Interpreter enables AI agents to write and execute code securely in sandbox environments, enhancing their accuracy and expanding their ability to solve complex end-to-end tasks. This is critical in Agentic AI applications where the agents may execute arbitrary code that can lead to data compromise or security risks. The AgentCore Code Interpreter tool provides secure code execution, which helps you avoid running into these issues.
@@ -507,7 +661,7 @@ The Code Interpreter construct supports the following network modes:
507661
```hcl
508662
module "agentcore" {
509663
source = "aws-ia/agentcore/aws"
510-
version = "0.0.2"
664+
version = "0.0.3"
511665
512666
# Enable Agent Core Code Interpreter Custom
513667
create_code_interpreter = true

0 commit comments

Comments
 (0)