submit - Extension Development for CloudFormation

submit

Description

Registers the extension with CloudFormation, in the specified region. Registering a extension makes it available for use in CloudFormation operations.

Registering includes:

  • Validating the resource schema.

  • Packaging up the resource project files and uploading them to CloudFormation.

    This includes the source code for your resource handlers. These resource handlers run within the CloudFormation account.

  • Determining which handlers have been specified for the resource, and running the appropriate contract tests.

  • Uploading the resource handlers as functions that CloudFormation calls at the appropriate times in a resource's lifecycle.

  • Returning a registration token that you can use with the DescribeTypeRegistration action to track the status of the registration request.

Note

The user registering the extension must be able to access the schema handler package in the Amazon S3 bucket. That is, the user needs to have GetObject permissions for the schema handler package. For more information, see Actions, Resources, and Condition Keys for Amazon S3 in the AWS Identity and Access Management User Guide.

Synopsis

$ cfn submit [--dry-run] [--endpoint-url <value>] [--region <value>] [--role-arn <value>] [--no-role] [--set-default]

Options

--dry-run

Validate the schema and package up the project files, but doesn't register the extension with CloudFormation.

--endpoint-url <value>

The CloudFormation endpoint to use.

--region <value>

The AWS Region in which to register the extension. If no region is specified, the extension is registered in the default region.

--role-arn <value>

A specific IAM role to use when invoking handler operations.

If you don't specify an IAM role, the CloudFormation CLI attempts to create or update an execution role based on the execution role template derived from the extension type's schema, and then passes this execution role to CloudFormation. For more information, see Accessing AWS APIs from a Resource Type.

You can't specify both --role-arn and --no-role arguments.

--no-role

Prevent the CloudFormation CLI from passing an execution role to CloudFormation.

If your resource type calls AWS APIs in any of its handlers, you must either specify a role Amazon Resource Name (ARN), or have the CloudFormation CLI create or update an execution role and pass that execution role to CloudFormation. For more information, see Accessing AWS APIs from a Resource Type.

You can't specify both --role-arn and --no-role arguments.

--set-default

Upon successful registration of the type version, sets the current type version as the default version.

Examples

The following command builds and packages your extension project without registering it.

$ cfn submit --dry-run

The following command registers your extension.

$ cfn submit --set-default

The following command registers your extension in the us-west-2 region.

$ cfn submit --region us-west-2

Output

Extension registration is an asynchronous operation. You can use the supplied registration token to track the progress of your extension registration request using the DescribeTypeRegistration operation of the CloudFormation API.

{‘ProgressStatus’: ‘COMPLETE’}