Skip to main content

capacity_providers

Creates, updates, deletes, gets or lists a capacity_providers resource.

Overview

Namecapacity_providers
TypeResource
Idaws.lambda.capacity_providers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
capacity_provider_arnstringThe Amazon Resource Name (ARN) of the capacity provider. (pattern: <code>arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:capacity-provider:[a-zA-Z0-9-_]+</code>)
capacity_provider_scaling_configobjectConfiguration that defines how the capacity provider scales compute instances based on demand and policies.
instance_requirementsobjectSpecifications that define the characteristics and constraints for compute instances used by the capacity provider.
kms_key_arnstringThe ARN of the KMS key used to encrypt the capacity provider's resources. (pattern: <code>(arn:(aws[a-zA-Z-])?:[a-z0-9-.]+:.)|()</code>)
last_modifiedstringThe date and time when the capacity provider was last modified. (pattern: <code>.*</code>)
permissions_configobjectConfiguration that specifies the permissions required for the capacity provider to manage compute resources.
propagate_tagsobjectConfiguration for tag propagation to managed resources launched by the capacity provider.
statestringThe current state of the capacity provider. (Pending, Active, Failed, Deleting)
telemetry_configobjectConfiguration that specifies the telemetry collection for the capacity provider.
vpc_configobjectVPC configuration that specifies the network settings for compute instances managed by the capacity provider.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_capacity_providerselectcapacity_provider_name, regionRetrieves information about a specific capacity provider, including its configuration, state, and associated resources.
list_capacity_providersselectregionState, Marker, MaxItemsReturns a list of capacity providers in your account.
create_capacity_providerinsertregion, CapacityProviderName, VpcConfig, PermissionsConfigCreates a capacity provider that manages compute resources for Lambda functions
update_capacity_providerupdatecapacity_provider_name, regionUpdates the configuration of an existing capacity provider.
delete_capacity_providerdeletecapacity_provider_name, regionDeletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
capacity_provider_namestringThe name of the capacity provider to delete.
regionstringAWS region (default: us-east-1)
MarkerstringSpecify the pagination token that's returned by a previous request to retrieve the next page of results.
MaxItemsintegerThe maximum number of capacity providers to return.
StatestringFilter capacity providers by their current state.

SELECT examples

Retrieves information about a specific capacity provider, including its configuration, state, and associated resources.

SELECT
capacity_provider_arn,
capacity_provider_scaling_config,
instance_requirements,
kms_key_arn,
last_modified,
permissions_config,
propagate_tags,
state,
telemetry_config,
vpc_config
FROM aws.lambda.capacity_providers
WHERE capacity_provider_name = '{{ capacity_provider_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a capacity provider that manages compute resources for Lambda functions

INSERT INTO aws.lambda.capacity_providers (
CapacityProviderName,
VpcConfig,
PermissionsConfig,
InstanceRequirements,
CapacityProviderScalingConfig,
KmsKeyArn,
Tags,
PropagateTags,
TelemetryConfig,
region
)
SELECT
'{{ CapacityProviderName }}' /* required */,
'{{ VpcConfig }}' /* required */,
'{{ PermissionsConfig }}' /* required */,
'{{ InstanceRequirements }}',
'{{ CapacityProviderScalingConfig }}',
'{{ KmsKeyArn }}',
'{{ Tags }}',
'{{ PropagateTags }}',
'{{ TelemetryConfig }}',
'{{ region }}'
RETURNING
capacity_provider
;

UPDATE examples

Updates the configuration of an existing capacity provider.

UPDATE aws.lambda.capacity_providers
SET
CapacityProviderScalingConfig = '{{ CapacityProviderScalingConfig }}',
PropagateTags = '{{ PropagateTags }}',
TelemetryConfig = '{{ TelemetryConfig }}'
WHERE
capacity_provider_name = '{{ capacity_provider_name }}' --required
AND region = '{{ region }}' --required
RETURNING
capacity_provider;

DELETE examples

Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.

DELETE FROM aws.lambda.capacity_providers
WHERE capacity_provider_name = '{{ capacity_provider_name }}' --required
AND region = '{{ region }}' --required
;