Modify network interface attributes
You can change the following network interface attributes:
Description
Security groups
Delete on termination
Source/destination check
Idle connection tracking timeout
Considerations
You can't change the attributes of a requester-managed network interface.
- Console
-
To modify network interface attributes
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Network Interfaces.
-
Select the checkbox for the network interface.
-
To change the description, do the following
-
Choose Actions, Change description.
-
For Description, enter a description.
-
Choose Save.
-
-
To change the security groups, do the following:
-
Choose Actions, Change security groups.
-
For Associated security groups, add and remove security groups as needed. The security group and network interface must be created for the same VPC.
-
Choose Save.
-
-
To change the termination behavior, do the following:
-
Choose Actions, Change termination behavior.
-
Select or clear Delete on termination, Enable.
-
Choose Save.
-
-
To change source/destination checking, do the following:
-
Choose Actions, Change source/dest check.
-
Select or clear Source/destination check, Enable.
-
Choose Save.
-
-
To change idle connection tracking timeouts, do the following:
-
Choose Actions, Modify idle connection tracking timeout.
-
Modify timeout values as needed. For more information, see Idle connection tracking timeout.
-
TCP established timeout: Timeout (in seconds) for idle TCP connections in an established state.
-
Min:
60seconds -
Max:
432000seconds -
Default:
350seconds for Nitrov6 instance types, excluding P6e-GB200. And432000seconds for other instance types, including P6e-GB200. -
Recommended: Less than
432000seconds
-
-
UDP timeout: Timeout (in seconds) for idle UDP flows that have seen traffic only in a single direction or a single request-response transaction.
-
Min:
30seconds -
Max:
60seconds -
Default:
30seconds
-
-
UDP stream timeout: Timeout (in seconds) for idle UDP flows classified as streams which have seen more than one request-response transaction.
-
Min:
60seconds -
Max:
180seconds -
Default:
180seconds
-
-
-
Choose Save.
-
- Amazon CLI
-
Example: To modify the description
Use the following modify-network-interface-attribute command.
aws ec2 modify-network-interface-attribute \ --network-interface-ideni-1234567890abcdef0\ --description "my updated description"Example: To modify the security groups
Use the following modify-network-interface-attribute command.
aws ec2 modify-network-interface-attribute \ --network-interface-ideni-1234567890abcdef0\ --groupssg-1234567890abcdef0Example: To modify the termination behavior
Use the following modify-network-interface-attribute command.
aws ec2 modify-network-interface-attribute \ --network-interface-ideni-1234567890abcdef0\ --attachment AttachmentId=eni-attach-43348162abEXAMPLE,DeleteOnTermination=falseExample: To enable source/destination checking
Use the following modify-network-interface-attribute command.
aws ec2 modify-network-interface-attribute \ --network-interface-ideni-1234567890abcdef0\ --source-dest-checkExample: To modify idle connection tracking timout
Use the following modify-network-interface-attribute command. For more information, see Idle connection tracking timeout.
aws ec2 modify-network-interface-attribute \ --network-interface-ideni-1234567890abcdef0\ --connection-tracking-specification TcpEstablishedTimeout=172800,UdpStreamTimeout=90,UdpTimeout=60 - PowerShell
-
Example: To modify the description
Use the Edit-EC2NetworkInterfaceAttribute cmdlet.
Edit-EC2NetworkInterfaceAttribute ` -NetworkInterfaceIdeni-1234567890abcdef0` -Description "my updated description"Example: To modify the security groups
Use the Edit-EC2NetworkInterfaceAttribute cmdlet.
Edit-EC2NetworkInterfaceAttribute ` -NetworkInterfaceIdeni-1234567890abcdef0` -Groupsg-1234567890abcdef0Example: To modify the termination behavior
Use the Edit-EC2NetworkInterfaceAttribute cmdlet.
Edit-EC2NetworkInterfaceAttribute ` -NetworkInterfaceIdeni-1234567890abcdef0` -Attachment_AttachmentIdeni-attach-43348162abEXAMPLE` -Attachment_DeleteOnTermination$falseExample: To enable source/destination checking
Use the Edit-EC2NetworkInterfaceAttribute cmdlet.
Edit-EC2NetworkInterfaceAttribute ` -NetworkInterfaceIdeni-1234567890abcdef0` -SourceDestCheck$trueExample: To modify idle connection tracking timeouts
Use the Edit-EC2NetworkInterfaceAttribute cmdlet. For more information, see Idle connection tracking timeout.
Edit-EC2NetworkInterfaceAttribute ` -NetworkInterfaceIdeni-1234567890abcdef0` -ConnectionTrackingSpecification_TcpEstablishedTimeout172800` -ConnectionTrackingSpecification_UdpStreamTimeout90` -ConnectionTrackingSpecification_UdpTimeout60