---
title: "POST /#X-Amz-Target=AWSServerMigrationService_V2016_10_24.GenerateTemplate"
method: POST
path: "/#X-Amz-Target=AWSServerMigrationService_V2016_10_24.GenerateTemplate"
---

# POST /#X-Amz-Target=AWSServerMigrationService_V2016_10_24.GenerateTemplate

`POST /#X-Amz-Target=AWSServerMigrationService_V2016_10_24.GenerateTemplate`

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

## Headers

- `X-Amz-Target` 'AWSServerMigrationService_V2016_10_24.GenerateTemplate', required

## Request body

- GenerateTemplateRequest
  - `appId` string — The ID of the application associated with the CloudFormation template.
  - `templateFormat` 'JSON' | 'YAML' — The format for generating the CloudFormation template.

## Response `200`

Success

- GenerateTemplateResponse
  - `s3Location` object — The location of the Amazon S3 object.
    - `bucket` string — The Amazon S3 bucket name.
    - `key` string — The Amazon S3 bucket key.

## Other responses

- `480` — UnauthorizedOperationException
- `481` — InvalidParameterException
- `482` — MissingRequiredParameterException
- `483` — InternalError
- `484` — OperationNotPermittedException

---

[API](https://skmtc.net/aws/apis/sms.md) · [All operations](https://skmtc.net/aws/apis/sms/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/sms/versions/b93b64b4502e/schema)
