pcluster build-image
Create a custom AWS ParallelCluster image in the specified Region.
pcluster build-image [-h] --image-configurationIMAGE_CONFIGURATION--image-idIMAGE_ID[--debug] [--dryrunDRYRUN] [--queryQUERY] [--regionREGION] [--rollback-on-failureROLLBACK_ON_FAILURE] [--suppress-validatorsSUPPRESS_VALIDATORS[SUPPRESS_VALIDATORS...]] [--validation-failure-level {INFO,WARNING,ERROR}]
Named arguments
-h, --help-
Shows the help text for
pcluster build-image. --image-configuration, -cIMAGE_CONFIGURATION-
Specifies the image configuration file as a YAML document.
--image-id, -iIMAGE_ID-
Specifies the id of the image that will be built.
--debug-
Turn on debug logging.
--dryrunDRYRUN-
When
true, the command performs validation without creating any resources. You can use this to validate the image configuration. (Defaults tofalse.) --queryQUERY-
JMESPath query to perform on output.
--region, -rREGION-
Specifies the AWS Region to use. The AWS Region must be specified, using the Region setting in the image configuration file, the
AWS_DEFAULT_REGIONenvironment variable, theregionsetting in the[default]section of the~/.aws/configfile, or the--regionparameter. --rollback-on-failureROLLBACK_ON_FAILURE-
When
true, automatically initiates an image stack rollback on failure. (Defaults tofalse.) --suppress-validatorsSUPPRESS_VALIDATORS[SUPPRESS_VALIDATORS ...]-
Identifies one or more config validators to suppress.
Format: (
ALL|type:[A-Za-z0-9]+) --validation-failure-level {INFO,WARNING,ERROR}-
Specifies the minimum validation level that will cause the creation to fail. (Defaults to
ERROR.)
Example using AWS ParallelCluster version 3.1.2:
$pcluster build-image --image-configurationimage-config.yaml--image-idcustom-alinux2-image{ "image": { "imageId": "custom-alinux2-image", "imageBuildStatus": "BUILD_IN_PROGRESS", "cloudformationStackStatus": "CREATE_IN_PROGRESS", "cloudformationStackArn": "arn:aws:cloudformation:us-east-1:123456789012:stack/custom-alinux2-image/1234abcd-56ef-78gh-90ij-abcd1234efgh", "region": "us-east-1", "version": "3.1.2" } }
Warning
pcluster build-image uses the default VPC. If the default VPC has been deleted, perhaps by using
AWS Control Tower or AWS Landing Zone, then the subnet ID must be specified in the image configuration file. For more
information, see SubnetId.