GenerateTemplate - Amazon Server Migration Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.


Generates an Amazon CloudFormation template based on the current launch configuration and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.

Request Syntax

{ "appId": "string", "templateFormat": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The ID of the application associated with the Amazon CloudFormation template.

Type: String

Required: No


The format for generating the Amazon CloudFormation template.

Type: String

Valid Values: JSON | YAML

Required: No

Response Syntax

{ "s3Location": { "bucket": "string", "key": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The location of the Amazon S3 object.

Type: S3Location object


For information about the errors that are common to all actions, see Common Errors.


An internal error occurred.

HTTP Status Code: 500


A specified parameter is not valid.

HTTP Status Code: 400


A required parameter is missing.

HTTP Status Code: 400


This operation is not allowed.

HTTP Status Code: 400


You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: