

# sam remote test-event
<a name="sam-cli-command-reference-remote-test-event"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam remote test-event` command.
+ For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)
+ For documentation on using the AWS SAM CLI `sam remote test-event` command, see [Introduction to cloud testing with sam remote test-event](using-sam-cli-remote-test-event.md).

The `sam remote test-event` command interacts with shareable test events in the Amazon EventBridge schema registry.

## Usage
<a name="sam-cli-command-reference-remote-test-event-usage"></a>

```
$ sam remote test-event <options> <subcommand>
```

## Options
<a name="sam-cli-command-reference-remote-test-event-options"></a>

`--help, -h`  <a name="sam-cli-command-reference-remote-invoke-options-help"></a>
Show the help message and exit.

## Subcommands
<a name="sam-cli-command-reference-remote-test-event-subcommands"></a>

`delete`  
Delete a shareable test event from the EventBridge schema registry. For more reference information, see [sam remote test-event delete](sam-cli-command-reference-remote-test-event-delete.md).

`get`  
Get a shareable test event from the EventBridge schema registry. For more reference information, see [sam remote test-event get](sam-cli-command-reference-remote-test-event-get.md).

`list`  
List existing shareable test events for an AWS Lambda function. For more reference information, see [sam remote test-event list](sam-cli-command-reference-remote-test-event-list.md).

`put`  
Save an event from a local file to the EventBridge schema registry. For more reference information, see [sam remote test-event put](sam-cli-command-reference-remote-test-event-put.md).

# sam remote test-event delete
<a name="sam-cli-command-reference-remote-test-event-delete"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam remote test-event delete` subcommand.
+ For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)
+ For documentation on using the AWS SAM CLI `sam remote test-event` command, see [Introduction to cloud testing with sam remote test-event](using-sam-cli-remote-test-event.md).

The `sam remote test-event delete` subcommand deletes a shareable test event from the Amazon EventBridge schema registry.

## Usage
<a name="sam-cli-command-reference-remote-test-event-delete-usage"></a>

```
$ sam remote test-event delete <arguments> <options>
```

## Arguments
<a name="sam-cli-command-reference-remote-test-event-delete-args"></a>

**Resource ID**  <a name="sam-cli-command-reference-remote-test-event-delete-args-resource-id"></a>
The ID of the AWS Lambda function associated with the shareable test event.  
If you provide a logical ID, you must also provide a value for the AWS CloudFormation stack associated with the Lambda function using the `--stack-name` option.  
*Valid values*: The resource's logical ID or resource ARN.

## Options
<a name="sam-cli-command-reference-remote-test-event-delete-options"></a>

`--config-env TEXT`  <a name="sam-cli-command-reference-remote-test-event-delete-options-config-env"></a>
The environment name specifying the default parameter values in the configuration file to use. The default value is "default". For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--config-file PATH`  <a name="sam-cli-command-reference-remote-test-event-delete-options-config-file"></a>
The path and file name of the configuration file containing default parameter values to use. The default value is "`samconfig.toml`" in the root of the project directory. For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--help, -h`  <a name="sam-cli-command-reference-remote-test-event-delete-options-help"></a>
Show the help message and exit.

`--name TEXT`  <a name="sam-cli-command-reference-remote-test-event-delete-options-name"></a>
The name of the shareable test event to delete.

`--stack-name TEXT`  <a name="sam-cli-command-reference-remote-test-event-delete-options-stack-name"></a>
The name of the CloudFormation stack associated with the Lambda function.  
This option is required if you are providing the Lambda function logical ID as an argument.

# sam remote test-event get
<a name="sam-cli-command-reference-remote-test-event-get"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam remote test-event get` subcommand.
+ For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)
+ For documentation on using the AWS SAM CLI `sam remote test-event` command, see [Introduction to cloud testing with sam remote test-event](using-sam-cli-remote-test-event.md).

The `sam remote test-event get` subcommand gets a shareable test event from the Amazon EventBridge schema registry.

## Usage
<a name="sam-cli-command-reference-remote-test-event-get-usage"></a>

```
$ sam remote test-event get <arguments> <options>
```

## Arguments
<a name="sam-cli-command-reference-remote-test-event-get-args"></a>

**Resource ID**  <a name="sam-cli-command-reference-remote-test-event-get-args-resource-id"></a>
The ID of the AWS Lambda function associated with the shareable test event to get.  
If you provide a logical ID, you must also provide a value for the AWS CloudFormation stack associated with the Lambda function using the `--stack-name` option.  
*Valid values*: The resource's logical ID or resource ARN.

## Options
<a name="sam-cli-command-reference-remote-test-event-get-options"></a>

`--config-env TEXT`  <a name="sam-cli-command-reference-remote-test-event-get-options-config-env"></a>
The environment name specifying the default parameter values in the configuration file to use. The default value is "default". For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--config-file PATH`  <a name="sam-cli-command-reference-remote-test-event-get-options-config-file"></a>
The path and file name of the configuration file containing default parameter values to use. The default value is "`samconfig.toml`" in the root of the project directory. For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--help, -h`  <a name="sam-cli-command-reference-remote-test-event-get-options-help"></a>
Show the help message and exit.

`--name TEXT`  <a name="sam-cli-command-reference-remote-test-event-get-options-name"></a>
The name of the shareable test event to get.

`--output-file FILENAME`  <a name="sam-cli-command-reference-remote-test-event-get-options-output-file"></a>
The file path and name to save the event to on your local machine.  
If you don’t provide this option, the AWS SAM CLI will output the contents of the shareable test event to your console.

`--stack-name TEXT`  <a name="sam-cli-command-reference-remote-test-event-get-options-stack-name"></a>
The name of the CloudFormation stack associated with the Lambda function.  
This option is required if you are providing the Lambda function logical ID as an argument.

# sam remote test-event list
<a name="sam-cli-command-reference-remote-test-event-list"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam remote test-event list` subcommand.
+ For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)
+ For documentation on using the AWS SAM CLI `sam remote test-event` command, see [Introduction to cloud testing with sam remote test-event](using-sam-cli-remote-test-event.md).

The `sam remote test-event list` subcommand lists the existing shareable test events for a specific AWS Lambda function from the Amazon EventBridge schema registry.

## Usage
<a name="sam-cli-command-reference-remote-test-event-list-usage"></a>

```
$ sam remote test-event list <arguments> <options>
```

## Arguments
<a name="sam-cli-command-reference-remote-test-event-list-args"></a>

**Resource ID**  <a name="sam-cli-command-reference-remote-test-event-list-args-resource-id"></a>
The ID of the Lambda function associated with the shareable test events.  
If you provide a logical ID, you must also provide a value for the AWS CloudFormation stack associated with the Lambda function using the `--stack-name` option.  
*Valid values*: The resource's logical ID or resource ARN.

## Options
<a name="sam-cli-command-reference-remote-test-event-list-options"></a>

`--config-env TEXT`  <a name="sam-cli-command-reference-remote-test-event-list-options-config-env"></a>
The environment name specifying the default parameter values in the configuration file to use. The default value is "default". For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--config-file PATH`  <a name="sam-cli-command-reference-remote-test-event-list-options-config-file"></a>
The path and file name of the configuration file containing default parameter values to use. The default value is "`samconfig.toml`" in the root of the project directory. For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--help, -h`  <a name="sam-cli-command-reference-remote-test-event-list-options-help"></a>
Show the help message and exit.

`--stack-name TEXT`  <a name="sam-cli-command-reference-remote-test-event-list-options-stack-name"></a>
The name of the CloudFormation stack associated with the Lambda function.  
This option is required if you are providing the Lambda function logical ID as an argument.

## Examples
<a name="sam-cli-command-reference-remote-test-event-list-examples"></a>

For examples on using this command, refer to [Listing shareable test events](using-sam-cli-remote-test-event.md#using-sam-cli-remote-test-event-use-list).

# sam remote test-event put
<a name="sam-cli-command-reference-remote-test-event-put"></a>

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) `sam remote test-event put` subcommand.
+ For an introduction to the AWS SAM CLI, see [What is the AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli)
+ For documentation on using the AWS SAM CLI `sam remote test-event` command, see [Introduction to cloud testing with sam remote test-event](using-sam-cli-remote-test-event.md).

The `sam remote test-event put` subcommand saves a shareable test event from your local machine to the Amazon EventBridge schema registry.

## Usage
<a name="sam-cli-command-reference-remote-test-event-put-usage"></a>

```
$ sam remote test-event put <arguments> <options>
```

## Arguments
<a name="sam-cli-command-reference-remote-test-event-put-args"></a>

**Resource ID**  <a name="sam-cli-command-reference-remote-test-event-put-args-resource-id"></a>
The ID of the AWS Lambda function associated with the shareable test event.  
If you provide a logical ID, you must also provide a value for the AWS CloudFormation stack associated with the Lambda function using the `--stack-name` option.  
*Valid values*: The resource's logical ID or resource ARN.

## Options
<a name="sam-cli-command-reference-remote-test-event-put-options"></a>

`--config-env TEXT`  <a name="sam-cli-command-reference-remote-test-event-put-options-config-env"></a>
The environment name specifying the default parameter values in the configuration file to use. The default value is "default". For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--config-file PATH`  <a name="sam-cli-command-reference-remote-test-event-put-options-config-file"></a>
The path and file name of the configuration file containing default parameter values to use. The default value is "`samconfig.toml`" in the root of the project directory. For more information about configuration files, see [AWS SAM CLI configuration file](serverless-sam-cli-config.md).

`--file FILENAME`  <a name="sam-cli-command-reference-remote-test-event-put-options-file"></a>
The file path and name to the event to on your local machine.  
Provide `-` as the file name value to read from `stdin`.  
This option is required.

`--force`, `-f`  <a name="sam-cli-command-reference-remote-test-event-put-options-force"></a>
Overwrite a shareable test event with the same name.

`--help, -h`  <a name="sam-cli-command-reference-remote-test-event-put-options-help"></a>
Show the help message and exit.

`--name TEXT`  <a name="sam-cli-command-reference-remote-test-event-put-options-name"></a>
The name to save the shareable test event as.  
If a shareable test event with the same name exists in the EventBridge schema registry, the AWS SAM CLI will not overwrite it. To overwrite, add the `--force` option.

`--output-file FILENAME`  <a name="sam-cli-command-reference-remote-test-event-put-options-output-file"></a>
The file path and name to save the event to on your local machine.  
If you don’t provide this option, the AWS SAM CLI will output the contents of the shareable test event to your console.

`--stack-name TEXT`  <a name="sam-cli-command-reference-remote-test-event-put-options-stack-name"></a>
The name of the CloudFormation stack associated with the Lambda function.  
This option is required if you are providing the Lambda function logical ID as an argument.

## Example
<a name="sam-cli-command-reference-remote-test-event-put-examples"></a>

For an example on using this command, refer to [Saving shareable test events](using-sam-cli-remote-test-event.md#using-sam-cli-remote-test-event-use-put).