Configure AWS Bedrock Agent Action Groups

The aws:bedrock/agentAgentActionGroup:AgentAgentActionGroup resource, part of the Pulumi AWS provider, defines action groups that extend Bedrock agents with custom capabilities by connecting them to Lambda functions or application code. This guide focuses on three capabilities: OpenAPI and function schema configuration, Lambda-based and custom control execution, and S3-based schema management.

Action groups belong to Bedrock agents and reference Lambda functions or S3 buckets for schema storage. The examples are intentionally small. Combine them with your own agent configuration, Lambda functions, and schema management strategy.

Define actions with an OpenAPI schema file

Most action groups define available actions through an OpenAPI schema that describes the API endpoints your Lambda function exposes.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";

const example = new aws.bedrock.AgentAgentActionGroup("example", {
    actionGroupName: "example",
    agentId: "GGRRAED6JP",
    agentVersion: "DRAFT",
    skipResourceInUseCheck: true,
    actionGroupExecutor: {
        lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    apiSchema: {
        payload: std.file({
            input: "path/to/schema.yaml",
        }).then(invoke => invoke.result),
    },
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std

example = aws.bedrock.AgentAgentActionGroup("example",
    action_group_name="example",
    agent_id="GGRRAED6JP",
    agent_version="DRAFT",
    skip_resource_in_use_check=True,
    action_group_executor={
        "lambda_": "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    api_schema={
        "payload": std.file(input="path/to/schema.yaml").result,
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "path/to/schema.yaml",
		}, nil)
		if err != nil {
			return err
		}
		_, err = bedrock.NewAgentAgentActionGroup(ctx, "example", &bedrock.AgentAgentActionGroupArgs{
			ActionGroupName:        pulumi.String("example"),
			AgentId:                pulumi.String("GGRRAED6JP"),
			AgentVersion:           pulumi.String("DRAFT"),
			SkipResourceInUseCheck: pulumi.Bool(true),
			ActionGroupExecutor: &bedrock.AgentAgentActionGroupActionGroupExecutorArgs{
				Lambda: pulumi.String("arn:aws:lambda:us-west-2:123456789012:function:example-function"),
			},
			ApiSchema: &bedrock.AgentAgentActionGroupApiSchemaArgs{
				Payload: pulumi.String(invokeFile.Result),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Bedrock.AgentAgentActionGroup("example", new()
    {
        ActionGroupName = "example",
        AgentId = "GGRRAED6JP",
        AgentVersion = "DRAFT",
        SkipResourceInUseCheck = true,
        ActionGroupExecutor = new Aws.Bedrock.Inputs.AgentAgentActionGroupActionGroupExecutorArgs
        {
            Lambda = "arn:aws:lambda:us-west-2:123456789012:function:example-function",
        },
        ApiSchema = new Aws.Bedrock.Inputs.AgentAgentActionGroupApiSchemaArgs
        {
            Payload = Std.File.Invoke(new()
            {
                Input = "path/to/schema.yaml",
            }).Apply(invoke => invoke.Result),
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrock.AgentAgentActionGroup;
import com.pulumi.aws.bedrock.AgentAgentActionGroupArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupActionGroupExecutorArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupApiSchemaArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new AgentAgentActionGroup("example", AgentAgentActionGroupArgs.builder()
            .actionGroupName("example")
            .agentId("GGRRAED6JP")
            .agentVersion("DRAFT")
            .skipResourceInUseCheck(true)
            .actionGroupExecutor(AgentAgentActionGroupActionGroupExecutorArgs.builder()
                .lambda("arn:aws:lambda:us-west-2:123456789012:function:example-function")
                .build())
            .apiSchema(AgentAgentActionGroupApiSchemaArgs.builder()
                .payload(StdFunctions.file(FileArgs.builder()
                    .input("path/to/schema.yaml")
                    .build()).result())
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:bedrock:AgentAgentActionGroup
    properties:
      actionGroupName: example
      agentId: GGRRAED6JP
      agentVersion: DRAFT
      skipResourceInUseCheck: true
      actionGroupExecutor:
        lambda: arn:aws:lambda:us-west-2:123456789012:function:example-function
      apiSchema:
        payload:
          fn::invoke:
            function: std:file
            arguments:
              input: path/to/schema.yaml
            return: result

The actionGroupExecutor property points to the Lambda function that executes actions. The apiSchema property loads the OpenAPI definition from a local file, which tells the agent what operations it can invoke and what parameters each accepts. The agentId and agentVersion properties connect this action group to a specific agent draft.

Reference API schemas stored in S3

Teams managing schemas centrally often store OpenAPI definitions in S3 rather than embedding them in infrastructure code.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.bedrock.AgentAgentActionGroup("example", {
    actionGroupName: "example",
    agentId: "GGRRAED6JP",
    agentVersion: "DRAFT",
    skipResourceInUseCheck: true,
    actionGroupExecutor: {
        lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    apiSchema: {
        s3: {
            s3BucketName: "example-bucket",
            s3ObjectKey: "path/to/schema.json",
        },
    },
});
import pulumi
import pulumi_aws as aws

example = aws.bedrock.AgentAgentActionGroup("example",
    action_group_name="example",
    agent_id="GGRRAED6JP",
    agent_version="DRAFT",
    skip_resource_in_use_check=True,
    action_group_executor={
        "lambda_": "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    api_schema={
        "s3": {
            "s3_bucket_name": "example-bucket",
            "s3_object_key": "path/to/schema.json",
        },
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := bedrock.NewAgentAgentActionGroup(ctx, "example", &bedrock.AgentAgentActionGroupArgs{
			ActionGroupName:        pulumi.String("example"),
			AgentId:                pulumi.String("GGRRAED6JP"),
			AgentVersion:           pulumi.String("DRAFT"),
			SkipResourceInUseCheck: pulumi.Bool(true),
			ActionGroupExecutor: &bedrock.AgentAgentActionGroupActionGroupExecutorArgs{
				Lambda: pulumi.String("arn:aws:lambda:us-west-2:123456789012:function:example-function"),
			},
			ApiSchema: &bedrock.AgentAgentActionGroupApiSchemaArgs{
				S3: &bedrock.AgentAgentActionGroupApiSchemaS3Args{
					S3BucketName: pulumi.String("example-bucket"),
					S3ObjectKey:  pulumi.String("path/to/schema.json"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Bedrock.AgentAgentActionGroup("example", new()
    {
        ActionGroupName = "example",
        AgentId = "GGRRAED6JP",
        AgentVersion = "DRAFT",
        SkipResourceInUseCheck = true,
        ActionGroupExecutor = new Aws.Bedrock.Inputs.AgentAgentActionGroupActionGroupExecutorArgs
        {
            Lambda = "arn:aws:lambda:us-west-2:123456789012:function:example-function",
        },
        ApiSchema = new Aws.Bedrock.Inputs.AgentAgentActionGroupApiSchemaArgs
        {
            S3 = new Aws.Bedrock.Inputs.AgentAgentActionGroupApiSchemaS3Args
            {
                S3BucketName = "example-bucket",
                S3ObjectKey = "path/to/schema.json",
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrock.AgentAgentActionGroup;
import com.pulumi.aws.bedrock.AgentAgentActionGroupArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupActionGroupExecutorArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupApiSchemaArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupApiSchemaS3Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new AgentAgentActionGroup("example", AgentAgentActionGroupArgs.builder()
            .actionGroupName("example")
            .agentId("GGRRAED6JP")
            .agentVersion("DRAFT")
            .skipResourceInUseCheck(true)
            .actionGroupExecutor(AgentAgentActionGroupActionGroupExecutorArgs.builder()
                .lambda("arn:aws:lambda:us-west-2:123456789012:function:example-function")
                .build())
            .apiSchema(AgentAgentActionGroupApiSchemaArgs.builder()
                .s3(AgentAgentActionGroupApiSchemaS3Args.builder()
                    .s3BucketName("example-bucket")
                    .s3ObjectKey("path/to/schema.json")
                    .build())
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:bedrock:AgentAgentActionGroup
    properties:
      actionGroupName: example
      agentId: GGRRAED6JP
      agentVersion: DRAFT
      skipResourceInUseCheck: true
      actionGroupExecutor:
        lambda: arn:aws:lambda:us-west-2:123456789012:function:example-function
      apiSchema:
        s3:
          s3BucketName: example-bucket
          s3ObjectKey: path/to/schema.json

The apiSchema.s3 block references a schema stored in S3 by bucket name and object key. This approach supports schema versioning and sharing across multiple action groups without duplicating schema content in your infrastructure code.

Define actions inline with function schema

For simpler use cases, you can define actions directly in the action group configuration without maintaining a separate OpenAPI file.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.bedrock.AgentAgentActionGroup("example", {
    actionGroupName: "example",
    agentId: "GGRRAED6JP",
    agentVersion: "DRAFT",
    skipResourceInUseCheck: true,
    actionGroupExecutor: {
        lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    functionSchema: {
        memberFunctions: {
            functions: [{
                name: "example-function",
                description: "Example function",
                parameters: [
                    {
                        mapBlockKey: "param1",
                        type: "string",
                        description: "The first parameter",
                        required: true,
                    },
                    {
                        mapBlockKey: "param2",
                        type: "integer",
                        description: "The second parameter",
                        required: false,
                    },
                ],
            }],
        },
    },
});
import pulumi
import pulumi_aws as aws

example = aws.bedrock.AgentAgentActionGroup("example",
    action_group_name="example",
    agent_id="GGRRAED6JP",
    agent_version="DRAFT",
    skip_resource_in_use_check=True,
    action_group_executor={
        "lambda_": "arn:aws:lambda:us-west-2:123456789012:function:example-function",
    },
    function_schema={
        "member_functions": {
            "functions": [{
                "name": "example-function",
                "description": "Example function",
                "parameters": [
                    {
                        "map_block_key": "param1",
                        "type": "string",
                        "description": "The first parameter",
                        "required": True,
                    },
                    {
                        "map_block_key": "param2",
                        "type": "integer",
                        "description": "The second parameter",
                        "required": False,
                    },
                ],
            }],
        },
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := bedrock.NewAgentAgentActionGroup(ctx, "example", &bedrock.AgentAgentActionGroupArgs{
			ActionGroupName:        pulumi.String("example"),
			AgentId:                pulumi.String("GGRRAED6JP"),
			AgentVersion:           pulumi.String("DRAFT"),
			SkipResourceInUseCheck: pulumi.Bool(true),
			ActionGroupExecutor: &bedrock.AgentAgentActionGroupActionGroupExecutorArgs{
				Lambda: pulumi.String("arn:aws:lambda:us-west-2:123456789012:function:example-function"),
			},
			FunctionSchema: &bedrock.AgentAgentActionGroupFunctionSchemaArgs{
				MemberFunctions: &bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsArgs{
					Functions: bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionArray{
						&bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionArgs{
							Name:        pulumi.String("example-function"),
							Description: pulumi.String("Example function"),
							Parameters: bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArray{
								&bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs{
									MapBlockKey: pulumi.String("param1"),
									Type:        pulumi.String("string"),
									Description: pulumi.String("The first parameter"),
									Required:    pulumi.Bool(true),
								},
								&bedrock.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs{
									MapBlockKey: pulumi.String("param2"),
									Type:        pulumi.String("integer"),
									Description: pulumi.String("The second parameter"),
									Required:    pulumi.Bool(false),
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Bedrock.AgentAgentActionGroup("example", new()
    {
        ActionGroupName = "example",
        AgentId = "GGRRAED6JP",
        AgentVersion = "DRAFT",
        SkipResourceInUseCheck = true,
        ActionGroupExecutor = new Aws.Bedrock.Inputs.AgentAgentActionGroupActionGroupExecutorArgs
        {
            Lambda = "arn:aws:lambda:us-west-2:123456789012:function:example-function",
        },
        FunctionSchema = new Aws.Bedrock.Inputs.AgentAgentActionGroupFunctionSchemaArgs
        {
            MemberFunctions = new Aws.Bedrock.Inputs.AgentAgentActionGroupFunctionSchemaMemberFunctionsArgs
            {
                Functions = new[]
                {
                    new Aws.Bedrock.Inputs.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionArgs
                    {
                        Name = "example-function",
                        Description = "Example function",
                        Parameters = new[]
                        {
                            new Aws.Bedrock.Inputs.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs
                            {
                                MapBlockKey = "param1",
                                Type = "string",
                                Description = "The first parameter",
                                Required = true,
                            },
                            new Aws.Bedrock.Inputs.AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs
                            {
                                MapBlockKey = "param2",
                                Type = "integer",
                                Description = "The second parameter",
                                Required = false,
                            },
                        },
                    },
                },
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrock.AgentAgentActionGroup;
import com.pulumi.aws.bedrock.AgentAgentActionGroupArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupActionGroupExecutorArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupFunctionSchemaArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupFunctionSchemaMemberFunctionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new AgentAgentActionGroup("example", AgentAgentActionGroupArgs.builder()
            .actionGroupName("example")
            .agentId("GGRRAED6JP")
            .agentVersion("DRAFT")
            .skipResourceInUseCheck(true)
            .actionGroupExecutor(AgentAgentActionGroupActionGroupExecutorArgs.builder()
                .lambda("arn:aws:lambda:us-west-2:123456789012:function:example-function")
                .build())
            .functionSchema(AgentAgentActionGroupFunctionSchemaArgs.builder()
                .memberFunctions(AgentAgentActionGroupFunctionSchemaMemberFunctionsArgs.builder()
                    .functions(AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionArgs.builder()
                        .name("example-function")
                        .description("Example function")
                        .parameters(                        
                            AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs.builder()
                                .mapBlockKey("param1")
                                .type("string")
                                .description("The first parameter")
                                .required(true)
                                .build(),
                            AgentAgentActionGroupFunctionSchemaMemberFunctionsFunctionParameterArgs.builder()
                                .mapBlockKey("param2")
                                .type("integer")
                                .description("The second parameter")
                                .required(false)
                                .build())
                        .build())
                    .build())
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:bedrock:AgentAgentActionGroup
    properties:
      actionGroupName: example
      agentId: GGRRAED6JP
      agentVersion: DRAFT
      skipResourceInUseCheck: true
      actionGroupExecutor:
        lambda: arn:aws:lambda:us-west-2:123456789012:function:example-function
      functionSchema:
        memberFunctions:
          functions:
            - name: example-function
              description: Example function
              parameters:
                - mapBlockKey: param1
                  type: string
                  description: The first parameter
                  required: true
                - mapBlockKey: param2
                  type: integer
                  description: The second parameter
                  required: false

The functionSchema property provides a streamlined alternative to OpenAPI schemas. Each function in the memberFunctions array describes an action with its parameters, types, and whether they’re required. The mapBlockKey identifies each parameter, and the type field specifies its data type.

Return control to application for custom handling

Some workflows require the application to handle action execution directly rather than delegating to Lambda.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";

const example = new aws.bedrock.AgentAgentActionGroup("example", {
    actionGroupName: "example",
    agentId: "GGRRAED6JP",
    agentVersion: "DRAFT",
    skipResourceInUseCheck: true,
    actionGroupExecutor: {
        customControl: "RETURN_CONTROL",
    },
    apiSchema: {
        payload: std.file({
            input: "path/to/schema.yaml",
        }).then(invoke => invoke.result),
    },
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std

example = aws.bedrock.AgentAgentActionGroup("example",
    action_group_name="example",
    agent_id="GGRRAED6JP",
    agent_version="DRAFT",
    skip_resource_in_use_check=True,
    action_group_executor={
        "custom_control": "RETURN_CONTROL",
    },
    api_schema={
        "payload": std.file(input="path/to/schema.yaml").result,
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/bedrock"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "path/to/schema.yaml",
		}, nil)
		if err != nil {
			return err
		}
		_, err = bedrock.NewAgentAgentActionGroup(ctx, "example", &bedrock.AgentAgentActionGroupArgs{
			ActionGroupName:        pulumi.String("example"),
			AgentId:                pulumi.String("GGRRAED6JP"),
			AgentVersion:           pulumi.String("DRAFT"),
			SkipResourceInUseCheck: pulumi.Bool(true),
			ActionGroupExecutor: &bedrock.AgentAgentActionGroupActionGroupExecutorArgs{
				CustomControl: pulumi.String("RETURN_CONTROL"),
			},
			ApiSchema: &bedrock.AgentAgentActionGroupApiSchemaArgs{
				Payload: pulumi.String(invokeFile.Result),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Bedrock.AgentAgentActionGroup("example", new()
    {
        ActionGroupName = "example",
        AgentId = "GGRRAED6JP",
        AgentVersion = "DRAFT",
        SkipResourceInUseCheck = true,
        ActionGroupExecutor = new Aws.Bedrock.Inputs.AgentAgentActionGroupActionGroupExecutorArgs
        {
            CustomControl = "RETURN_CONTROL",
        },
        ApiSchema = new Aws.Bedrock.Inputs.AgentAgentActionGroupApiSchemaArgs
        {
            Payload = Std.File.Invoke(new()
            {
                Input = "path/to/schema.yaml",
            }).Apply(invoke => invoke.Result),
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrock.AgentAgentActionGroup;
import com.pulumi.aws.bedrock.AgentAgentActionGroupArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupActionGroupExecutorArgs;
import com.pulumi.aws.bedrock.inputs.AgentAgentActionGroupApiSchemaArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new AgentAgentActionGroup("example", AgentAgentActionGroupArgs.builder()
            .actionGroupName("example")
            .agentId("GGRRAED6JP")
            .agentVersion("DRAFT")
            .skipResourceInUseCheck(true)
            .actionGroupExecutor(AgentAgentActionGroupActionGroupExecutorArgs.builder()
                .customControl("RETURN_CONTROL")
                .build())
            .apiSchema(AgentAgentActionGroupApiSchemaArgs.builder()
                .payload(StdFunctions.file(FileArgs.builder()
                    .input("path/to/schema.yaml")
                    .build()).result())
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:bedrock:AgentAgentActionGroup
    properties:
      actionGroupName: example
      agentId: GGRRAED6JP
      agentVersion: DRAFT
      skipResourceInUseCheck: true
      actionGroupExecutor:
        customControl: RETURN_CONTROL
      apiSchema:
        payload:
          fn::invoke:
            function: std:file
            arguments:
              input: path/to/schema.yaml
            return: result

The actionGroupExecutor.customControl property set to “RETURN_CONTROL” passes the agent’s action request back to your application code. Your application receives the action details and must implement the execution logic, then return results to the agent. This model gives you full control over action processing.

Beyond these examples

These snippets focus on specific action group features: OpenAPI and function schema definitions, Lambda and custom control execution models, and S3-based schema storage. They’re intentionally minimal rather than full agent implementations.

The examples reference pre-existing infrastructure such as Bedrock agents (agentId references), Lambda functions for action execution, and S3 buckets for schema storage. They focus on configuring the action group rather than provisioning the surrounding agent infrastructure.

To keep things focused, common action group patterns are omitted, including:

  • Action group state management (actionGroupState)
  • User input collection (parentActionGroupSignature with AMAZON.UserInput)
  • Agent preparation control (prepareAgent)
  • Resource deletion safeguards (skipResourceInUseCheck)

These omissions are intentional: the goal is to illustrate how each action group feature is wired, not provide drop-in agent modules. See the Bedrock Agent Action Group resource reference for all available configuration options.

Let's configure AWS Bedrock Agent Action Groups

Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.

Try Pulumi Cloud for FREE

Frequently Asked Questions

Schema Configuration
What are my options for defining the action group schema?
You have three options: (1) inline OpenAPI schema using apiSchema.payload, (2) S3-hosted schema using apiSchema.s3 with s3BucketName and s3ObjectKey, or (3) simplified function definitions using functionSchema.memberFunctions.
Can I use both apiSchema and functionSchema together?
No, these are mutually exclusive options. Use apiSchema for OpenAPI schemas or functionSchema for simplified function definitions, but not both.
What's the difference between inline payload and S3 for apiSchema?
Inline payload (apiSchema.payload) embeds the schema directly in your code, while S3 (apiSchema.s3) references a schema file stored in an S3 bucket using s3BucketName and s3ObjectKey.
Executor Configuration
What's the difference between Lambda and return of control executors?
Lambda executor (actionGroupExecutor.lambda) runs your function directly with the ARN you provide. Return of control (actionGroupExecutor.customControl: "RETURN_CONTROL") returns control to your application for custom handling of the action.
Special Configurations
What happens when I set parentActionGroupSignature to AMAZON.UserInput?
Setting parentActionGroupSignature to AMAZON.UserInput allows your agent to request additional information from users. You must leave description, apiSchema, and actionGroupExecutor blank when using this value.
How do I enable or disable an action group?
Use the actionGroupState property with ENABLED to make the action group available for InvokeAgent requests, or DISABLED to prevent invocation.
Agent Lifecycle & Versioning
Why can I only use DRAFT for agentVersion?
The agentVersion property currently only accepts DRAFT as a valid value.
What does prepareAgent do?
The prepareAgent property controls whether the agent is prepared after creation or modification. It defaults to true, automatically preparing the agent for use.
How do I skip the in-use check when deleting an action group?
Set skipResourceInUseCheck to true to bypass the in-use validation during deletion.

Using a different cloud?

Explore analytics guides for other cloud providers: