- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateDeploymentCommand
Creates a deployment for a manually deployed Amplify app. Manually deployed apps are not connected to a Git repository.
The maximum duration between the CreateDeployment
call and the StartDeployment
call cannot exceed 8 hours. If the duration exceeds 8 hours, the StartDeployment
call and the associated Job
will fail.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { AmplifyClient, CreateDeploymentCommand } from "@aws-sdk/client-amplify"; // ES Modules import
// const { AmplifyClient, CreateDeploymentCommand } = require("@aws-sdk/client-amplify"); // CommonJS import
const client = new AmplifyClient(config);
const input = { // CreateDeploymentRequest
appId: "STRING_VALUE", // required
branchName: "STRING_VALUE", // required
fileMap: { // FileMap
"<keys>": "STRING_VALUE",
},
};
const command = new CreateDeploymentCommand(input);
const response = await client.send(command);
// { // CreateDeploymentResult
// jobId: "STRING_VALUE",
// fileUploadUrls: { // FileUploadUrls // required
// "<keys>": "STRING_VALUE",
// },
// zipUploadUrl: "STRING_VALUE", // required
// };
CreateDeploymentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
appId Required | string | undefined | The unique ID for an Amplify app. |
branchName Required | string | undefined | The name of the branch to use for the job. |
fileMap | Record<string, string> | undefined | An optional file map that contains the file name as the key and the file content md5 hash as the value. If this argument is provided, the service will generate a unique upload URL per file. Otherwise, the service will only generate a single upload URL for the zipped files. |
CreateDeploymentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
fileUploadUrls Required | Record<string, string> | undefined | When the |
zipUploadUrl Required | string | undefined | When the |
jobId | string | undefined | The job ID for this deployment. will supply to start deployment api. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BadRequestException | client | A request contains unexpected data. |
InternalFailureException | server | The service failed to perform an operation due to an internal issue. |
LimitExceededException | client | A resource could not be created because service quotas were exceeded. |
UnauthorizedException | client | An operation failed due to a lack of access. |
AmplifyServiceException | Base exception class for all service exceptions from Amplify service. |