AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.
create-fleet
--name <value>
--base-capacity <value>
--environment-type <value>
--compute-type <value>
[--compute-configuration <value>]
[--scaling-configuration <value>]
[--overflow-behavior <value>]
[--vpc-config <value>]
[--proxy-configuration <value>]
[--image-id <value>]
[--fleet-service-role <value>]
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
--name
(string)
The name of the compute fleet.
--base-capacity
(integer)
The initial number of machines allocated to the fleet, which defines the number of builds that can run in parallel.
--environment-type
(string)
The environment type of the compute fleet.
- The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).- The environment type
ARM_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).- The environment type
MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)- The environment type
MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).- The environment type
WINDOWS_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland).- The environment type
WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).For more information, see Build environment compute types in the CodeBuild user guide .
Possible values:
WINDOWS_CONTAINER
LINUX_CONTAINER
LINUX_GPU_CONTAINER
ARM_CONTAINER
WINDOWS_SERVER_2019_CONTAINER
LINUX_LAMBDA_CONTAINER
ARM_LAMBDA_CONTAINER
LINUX_EC2
ARM_EC2
WINDOWS_EC2
MAC_ARM
--compute-type
(string)
Information about the compute resources the compute fleet uses. Available values include:
ATTRIBUTE_BASED_COMPUTE
: Specify the amount of vCPUs, memory, disk space, and the type of machine.Note
If you useATTRIBUTE_BASED_COMPUTE
, you must define your attributes by usingcomputeConfiguration
. CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved capacity environment types in the CodeBuild User Guide .
BUILD_GENERAL1_SMALL
: Use up to 4 GiB memory and 2 vCPUs for builds.BUILD_GENERAL1_MEDIUM
: Use up to 8 GiB memory and 4 vCPUs for builds.BUILD_GENERAL1_LARGE
: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_XLARGE
: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_2XLARGE
: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.BUILD_LAMBDA_1GB
: Use up to 1 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_2GB
: Use up to 2 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_4GB
: Use up to 4 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_8GB
: Use up to 8 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_10GB
: Use up to 10 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.If you use
BUILD_GENERAL1_SMALL
:
- For environment type
LINUX_CONTAINER
, you can use up to 4 GiB memory and 2 vCPUs for builds.- For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.- For environment type
ARM_CONTAINER
, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds.If you use
BUILD_GENERAL1_LARGE
:
- For environment type
LINUX_CONTAINER
, you can use up to 16 GiB memory and 8 vCPUs for builds.- For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.- For environment type
ARM_CONTAINER
, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds.For more information, see On-demand environment types in the CodeBuild User Guide.
Possible values:
BUILD_GENERAL1_SMALL
BUILD_GENERAL1_MEDIUM
BUILD_GENERAL1_LARGE
BUILD_GENERAL1_XLARGE
BUILD_GENERAL1_2XLARGE
BUILD_LAMBDA_1GB
BUILD_LAMBDA_2GB
BUILD_LAMBDA_4GB
BUILD_LAMBDA_8GB
BUILD_LAMBDA_10GB
ATTRIBUTE_BASED_COMPUTE
--compute-configuration
(structure)
The compute configuration of the compute fleet. This is only required if
computeType
is set toATTRIBUTE_BASED_COMPUTE
.vCpu -> (long)
The number of vCPUs of the instance type included in your fleet.memory -> (long)
The amount of memory of the instance type included in your fleet.disk -> (long)
The amount of disk space of the instance type included in your fleet.machineType -> (string)
The machine type of the instance type included in your fleet.
Shorthand Syntax:
vCpu=long,memory=long,disk=long,machineType=string
JSON Syntax:
{
"vCpu": long,
"memory": long,
"disk": long,
"machineType": "GENERAL"|"NVME"
}
--scaling-configuration
(structure)
The scaling configuration of the compute fleet.
scalingType -> (string)
The scaling type for a compute fleet.targetTrackingScalingConfigs -> (list)
A list of
TargetTrackingScalingConfiguration
objects.(structure)
Defines when a new instance is auto-scaled into the compute fleet.
metricType -> (string)
The metric type to determine auto-scaling.targetValue -> (double)
The value ofmetricType
when to start scaling.maxCapacity -> (integer)
The maximum number of instances in the fleet when auto-scaling.
Shorthand Syntax:
scalingType=string,targetTrackingScalingConfigs=[{metricType=string,targetValue=double},{metricType=string,targetValue=double}],maxCapacity=integer
JSON Syntax:
{
"scalingType": "TARGET_TRACKING_SCALING",
"targetTrackingScalingConfigs": [
{
"metricType": "FLEET_UTILIZATION_RATE",
"targetValue": double
}
...
],
"maxCapacity": integer
}
--overflow-behavior
(string)
The compute fleet overflow behavior.
- For overflow behavior
QUEUE
, your overflow builds need to wait on the existing fleet instance to become available.- For overflow behavior
ON_DEMAND
, your overflow builds run on CodeBuild on-demand.Note
If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface .Possible values:
QUEUE
ON_DEMAND
--vpc-config
(structure)
Information about the VPC configuration that CodeBuild accesses.
vpcId -> (string)
The ID of the Amazon VPC.subnets -> (list)
A list of one or more subnet IDs in your Amazon VPC.
(string)
securityGroupIds -> (list)
A list of one or more security groups IDs in your Amazon VPC.
(string)
Shorthand Syntax:
vpcId=string,subnets=string,string,securityGroupIds=string,string
JSON Syntax:
{
"vpcId": "string",
"subnets": ["string", ...],
"securityGroupIds": ["string", ...]
}
--proxy-configuration
(structure)
The proxy configuration of the compute fleet.
defaultBehavior -> (string)
The default behavior of outgoing traffic.orderedProxyRules -> (list)
An array of
FleetProxyRule
objects that represent the specified destination domains or IPs to allow or deny network access control to.(structure)
Information about the proxy rule for your reserved capacity instances.
type -> (string)
The type of proxy rule.effect -> (string)
The behavior of the proxy rule.entities -> (list)
The destination of the proxy rule.
(string)
JSON Syntax:
{
"defaultBehavior": "ALLOW_ALL"|"DENY_ALL",
"orderedProxyRules": [
{
"type": "DOMAIN"|"IP",
"effect": "ALLOW"|"DENY",
"entities": ["string", ...]
}
...
]
}
--image-id
(string)
The Amazon Machine Image (AMI) of the compute fleet.
--fleet-service-role
(string)
The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide .
--tags
(list)
A list of tag key and value pairs associated with this compute fleet.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
(structure)
A tag, consisting of a key and a value.
This tag is available for use by Amazon Web Services services that support tags in CodeBuild.
key -> (string)
The tag's key.value -> (string)
The tag's value.
Shorthand Syntax:
key=string,value=string ...
JSON Syntax:
[
{
"key": "string",
"value": "string"
}
...
]
--cli-input-json
(string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command's default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
fleet -> (structure)
Information about the compute fleet
arn -> (string)
The ARN of the compute fleet.name -> (string)
The name of the compute fleet.id -> (string)
The ID of the compute fleet.created -> (timestamp)
The time at which the compute fleet was created.lastModified -> (timestamp)
The time at which the compute fleet was last modified.status -> (structure)
The status of the compute fleet.
statusCode -> (string)
The status code of the compute fleet. Valid values include:
CREATING
: The compute fleet is being created.UPDATING
: The compute fleet is being updated.ROTATING
: The compute fleet is being rotated.PENDING_DELETION
: The compute fleet is pending deletion.DELETING
: The compute fleet is being deleted.CREATE_FAILED
: The compute fleet has failed to create.UPDATE_ROLLBACK_FAILED
: The compute fleet has failed to update and could not rollback to previous state.ACTIVE
: The compute fleet has succeeded and is active.context -> (string)
Additional information about a compute fleet. Valid values include:
CREATE_FAILED
: The compute fleet has failed to create.UPDATE_FAILED
: The compute fleet has failed to update.message -> (string)
A message associated with the status of a compute fleet.baseCapacity -> (integer)
The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.environmentType -> (string)
The environment type of the compute fleet.
- The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).- The environment type
ARM_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).- The environment type
MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)- The environment type
MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).- The environment type
WINDOWS_EC2
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).- The environment type
WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland).- The environment type
WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).For more information, see Build environment compute types in the CodeBuild user guide .
computeType -> (string)
Information about the compute resources the compute fleet uses. Available values include:
ATTRIBUTE_BASED_COMPUTE
: Specify the amount of vCPUs, memory, disk space, and the type of machine.Note
If you useATTRIBUTE_BASED_COMPUTE
, you must define your attributes by usingcomputeConfiguration
. CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved capacity environment types in the CodeBuild User Guide .
BUILD_GENERAL1_SMALL
: Use up to 4 GiB memory and 2 vCPUs for builds.BUILD_GENERAL1_MEDIUM
: Use up to 8 GiB memory and 4 vCPUs for builds.BUILD_GENERAL1_LARGE
: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_XLARGE
: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_2XLARGE
: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.BUILD_LAMBDA_1GB
: Use up to 1 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_2GB
: Use up to 2 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_4GB
: Use up to 4 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_8GB
: Use up to 8 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.BUILD_LAMBDA_10GB
: Use up to 10 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.If you use
BUILD_GENERAL1_SMALL
:
- For environment type
LINUX_CONTAINER
, you can use up to 4 GiB memory and 2 vCPUs for builds.- For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.- For environment type
ARM_CONTAINER
, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds.If you use
BUILD_GENERAL1_LARGE
:
- For environment type
LINUX_CONTAINER
, you can use up to 16 GiB memory and 8 vCPUs for builds.- For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.- For environment type
ARM_CONTAINER
, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds.For more information, see On-demand environment types in the CodeBuild User Guide.
computeConfiguration -> (structure)
The compute configuration of the compute fleet. This is only required if
computeType
is set toATTRIBUTE_BASED_COMPUTE
.vCpu -> (long)
The number of vCPUs of the instance type included in your fleet.memory -> (long)
The amount of memory of the instance type included in your fleet.disk -> (long)
The amount of disk space of the instance type included in your fleet.machineType -> (string)
The machine type of the instance type included in your fleet.scalingConfiguration -> (structure)
The scaling configuration of the compute fleet.
scalingType -> (string)
The scaling type for a compute fleet.targetTrackingScalingConfigs -> (list)
A list of
TargetTrackingScalingConfiguration
objects.(structure)
Defines when a new instance is auto-scaled into the compute fleet.
metricType -> (string)
The metric type to determine auto-scaling.targetValue -> (double)
The value ofmetricType
when to start scaling.maxCapacity -> (integer)
The maximum number of instances in the fleet when auto-scaling.desiredCapacity -> (integer)
The desired number of instances in the fleet when auto-scaling.overflowBehavior -> (string)
The compute fleet overflow behavior.
- For overflow behavior
QUEUE
, your overflow builds need to wait on the existing fleet instance to become available.- For overflow behavior
ON_DEMAND
, your overflow builds run on CodeBuild on-demand.Note
If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface .vpcConfig -> (structure)
Information about the VPC configuration that CodeBuild accesses.
vpcId -> (string)
The ID of the Amazon VPC.subnets -> (list)
A list of one or more subnet IDs in your Amazon VPC.
(string)
securityGroupIds -> (list)
A list of one or more security groups IDs in your Amazon VPC.
(string)
proxyConfiguration -> (structure)
The proxy configuration of the compute fleet.
defaultBehavior -> (string)
The default behavior of outgoing traffic.orderedProxyRules -> (list)
An array of
FleetProxyRule
objects that represent the specified destination domains or IPs to allow or deny network access control to.(structure)
Information about the proxy rule for your reserved capacity instances.
type -> (string)
The type of proxy rule.effect -> (string)
The behavior of the proxy rule.entities -> (list)
The destination of the proxy rule.
(string)
imageId -> (string)
The Amazon Machine Image (AMI) of the compute fleet.fleetServiceRole -> (string)
The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide .tags -> (list)
A list of tag key and value pairs associated with this compute fleet.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
(structure)
A tag, consisting of a key and a value.
This tag is available for use by Amazon Web Services services that support tags in CodeBuild.
key -> (string)
The tag's key.value -> (string)
The tag's value.