Create an Amazon Lambda Compute Platform deployment (CLI) - Amazon CodeDeploy
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.

Create an Amazon Lambda Compute Platform deployment (CLI)

After you have created the application and revision (in Amazon Lambda deployments, this is the AppSpec file):

Call the create-deployment command, specifying:

  • An application name. To view a list of application names, call the list-applications command.

  • A deployment group name. To view a list of deployment group names, call the list-deployment-groups command.

  • Information about the revision to be deployed:

    For revisions stored in Amazon S3:

    • The Amazon S3 bucket name that contains the revision.

    • The name of the uploaded revision.

    • (Optional) The Amazon S3 version identifier for the revision. (If the version identifier is not specified, CodeDeploy uses the most recent version.)

    • (Optional) The ETag for the revision. (If the ETag is not specified, CodeDeploy skips object validation.)

    For revisions stored in a file that is not in Amazon S3, you need the file name and its path. Your revision file is written using JSON or YAML, so it most likely has a .json or .yaml extension.

  • (Optional) The name of a deployment configuration to use. To view a list of deployment configurations, call the list-deployment-configs command. (If not specified, CodeDeploy uses a specific default deployment configuration.)

  • (Optional) A description for the deployment.

The revision file can be specified as a file uploaded to an Amazon S3 bucket or as a string. The syntax for each when used as part of the create-deployment command is:

  • Amazon S3 bucket:

    The version and eTag are optional.

    --s3-location bucket=string,key=string,bundleType=JSON|YAML,version=string,eTag=string
  • String:

    --revision '{"revisionType": "String", "string": {"content":"revision-as-string"}}'

The create-deployment command can load a revision from a file. For more information, see Loading parameters from a file.

For Amazon Lambda deployment revision templates, see Add an AppSpec file for an Amazon Lambda deployment. For an example revision, see AppSpec File example for an Amazon Lambda deployment .

To track the status of your deployment, see View CodeDeploy deployment details .