Skip to main content

network_connectors

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

Overview

Namenetwork_connectors
TypeResource
Idaws.lambda_core.network_connectors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the network connector. (pattern: <code>(arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:network-connector:[a-zA-Z0-9-_]+(:[1-9]|[1-9][0-9]+)?)</code>)
configurationobjectThe network configuration for a network connector. Different connector types use different configuration shapes; specify the configuration that matches your connector type.
idstringThe unique identifier for a network connector, assigned by the service at creation time
last_modifiedstring (date-time)The date and time when the connector configuration was last modified.
last_update_statusstringThe status of the most recent update operation (Successful, Failed, or InProgress). (Successful, Failed, InProgress)
last_update_status_reasonstringA human-readable explanation of the last update status.
last_update_status_reason_codestringA machine-readable code indicating the reason for the last update status. Use this for programmatic error handling. (DisallowedByVpcEncryptionControl, Ec2RequestLimitExceeded, InsufficientRolePermissions, InternalError, InvalidSecurityGroup, InvalidSubnet, SubnetOutOfIPAddresses)
namestringThe name of the network connector. (pattern: <code>(arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:network-connector:[a-zA-Z0-9-]+(:[1-9]|[1-9][0-9]+)?)|[a-zA-Z0-9-]{1,64}</code>)
operator_rolestringThe ARN of the IAM role that Lambda uses to manage the underlying ENI resources for this connector. (pattern: <code>arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
statestringThe current state of the network connector. (PENDING, ACTIVE, INACTIVE, FAILED, DELETING, DELETE_FAILED)
state_reasonstringA human-readable explanation of the current state, populated when the state is FAILED or DELETE_FAILED.
state_reason_codestringA machine-readable code indicating the reason for the current state. Use this for programmatic error handling. (DisallowedByVpcEncryptionControl, Ec2RequestLimitExceeded, InsufficientRolePermissions, InternalError, InvalidSecurityGroup, InvalidSubnet, SubnetOutOfIPAddresses)
versioninteger (int64)The version number of the connector configuration, incremented on each update.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_network_connectorselectidentifier, regionRetrieves the current configuration, state, and metadata of a network connector. The Identifier parameter accepts the connector ID, name, or full ARN. Use this operation to poll connector state after creation or update, or to inspect the current VPC configuration and any failure reasons. The response includes the full connector configuration, current state, and — if the connector has been updated — the LastUpdateStatus and LastUpdateStatusReasonCode fields that indicate whether the most recent update succeeded or failed.
list_network_connectorsselectregionState, Marker, MaxItemsReturns a paginated list of network connectors in your account for the current Region. You can optionally filter results by connector state. Use the Marker parameter from a previous response to retrieve the next page of results. Each item in the response includes the connector ARN, name, ID, type, current state, and last modified timestamp. To retrieve full configuration details for a specific connector, use GetNetworkConnector.
create_network_connectorinsertregionCreates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs. This operation is asynchronous. The network connector starts in PENDING state while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). Use GetNetworkConnector to poll the connector state until it reaches ACTIVE. Once active, you can attach the connector to Lambda MicroVMs at run time using the egressNetworkConnectors parameter on RunMicroVm. This operation is idempotent when you provide a ClientToken — if you retry a request that completed successfully using the same client token, the operation returns the existing connector without creating a duplicate.
update_network_connectorupdateidentifier, regionUpdates the VPC configuration or operator role of an existing network connector. You can modify the subnet IDs, security group IDs, network protocol, or operator role. The connector must be in ACTIVE state to accept updates. This operation is asynchronous. The connector remains in ACTIVE state during the update — existing workloads that reference this connector are not disrupted. Use GetNetworkConnector to monitor the LastUpdateStatus field, which transitions through InProgress to Successful or Failed. If the update fails, the LastUpdateStatusReasonCode field provides a specific error code for troubleshooting. This operation is idempotent when you provide a ClientToken.
delete_network_connectordeleteidentifier, regionInitiates deletion of a network connector. The connector transitions to DELETING state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to GetNetworkConnector return ResourceNotFoundException. This operation is idempotent — calling delete on a connector that is already deleting or has been deleted succeeds without error. You can delete connectors in ACTIVE or FAILED states. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.

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
identifierstring
regionstringAWS region (default: us-east-1)
MarkerstringThe pagination token from a previous ListNetworkConnectors response. Use this value to retrieve the next page of results.
MaxItemsintegerThe maximum number of connectors to return per page. Valid range: 1 to 100.
StatestringOptional filter to return only connectors in the specified state (for example, ACTIVE or FAILED).

SELECT examples

Retrieves the current configuration, state, and metadata of a network connector. The Identifier parameter accepts the connector ID, name, or full ARN. Use this operation to poll connector state after creation or update, or to inspect the current VPC configuration and any failure reasons. The response includes the full connector configuration, current state, and — if the connector has been updated — the LastUpdateStatus and LastUpdateStatusReasonCode fields that indicate whether the most recent update succeeded or failed.

SELECT
arn,
configuration,
id,
last_modified,
last_update_status,
last_update_status_reason,
last_update_status_reason_code,
name,
operator_role,
state,
state_reason,
state_reason_code,
version
FROM aws.lambda_core.network_connectors
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs. This operation is asynchronous. The network connector starts in PENDING state while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). Use GetNetworkConnector to poll the connector state until it reaches ACTIVE. Once active, you can attach the connector to Lambda MicroVMs at run time using the egressNetworkConnectors parameter on RunMicroVm. This operation is idempotent when you provide a ClientToken — if you retry a request that completed successfully using the same client token, the operation returns the existing connector without creating a duplicate.

INSERT INTO aws.lambda_core.network_connectors (
Name,
Configuration,
OperatorRole,
ClientToken,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Configuration }}',
'{{ OperatorRole }}',
'{{ ClientToken }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
arn,
configuration,
id,
name,
operator_role,
state
;

UPDATE examples

Updates the VPC configuration or operator role of an existing network connector. You can modify the subnet IDs, security group IDs, network protocol, or operator role. The connector must be in ACTIVE state to accept updates. This operation is asynchronous. The connector remains in ACTIVE state during the update — existing workloads that reference this connector are not disrupted. Use GetNetworkConnector to monitor the LastUpdateStatus field, which transitions through InProgress to Successful or Failed. If the update fails, the LastUpdateStatusReasonCode field provides a specific error code for troubleshooting. This operation is idempotent when you provide a ClientToken.

UPDATE aws.lambda_core.network_connectors
SET
Configuration = '{{ Configuration }}',
OperatorRole = '{{ OperatorRole }}',
ClientToken = '{{ ClientToken }}'
WHERE
identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
configuration,
id,
last_modified,
last_update_status,
last_update_status_reason,
name,
operator_role,
state;

DELETE examples

Initiates deletion of a network connector. The connector transitions to DELETING state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to GetNetworkConnector return ResourceNotFoundException. This operation is idempotent — calling delete on a connector that is already deleting or has been deleted succeeds without error. You can delete connectors in ACTIVE or FAILED states. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.

DELETE FROM aws.lambda_core.network_connectors
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;