

# invoke


## Description


Performs contract tests on the specified handler of an extension type.

## Synopsis


```
$ cfn invoke 
    [--endpoint <value>] 
    [--function-name <value>]
    [--region <value>]
    [--max-reinvoke <value>]
    action 
    request
```

## Options


`--endpoint <value>`

The endpoint at which the type can be invoked. Alternately, you can also specify an actual Lambda endpoint and function name in your Amazon Web Services account.

Default: `http://127.0.0.1.3001`

`--function-name <value>`

The logical Lambda function name in the Amazon SAM template. Alternately, you can also specify an actual Lambda endpoint and function name in your Amazon Web Services account.

Default: `TypeFunction`

`--region <value>`

The region to configure the client to interact with.

Default: `us-east-1`

`--max-reinvoke <value>`

Maximum number of `IN_PROGRESS` re-invocations allowed before exiting. If not specified, will continue to re-invoke until terminal status is reached.

`action`

Which single handler to invoke.

Values: `CREATE` \$1 `READ` \$1 `UPDATE` \$1 `DELETE` \$1 `LIST`

`request`

File path to a JSON file containing the request with which to invoke the function.