Error while creating network interface : Value (interface) for parameter InterfaceType is invalid.

0

Getting below error while creating network interface even though the interfaceType value is valid. Any ideas in which scenarios such an error can occur

Value (interface) for parameter InterfaceType is invalid. Allowed values are ('EFA') (Service: Ec2, Status Code: 400, Request ID: 4f3221ef-26d5-40e3-b10c-31d15e55e434

  • Could you provide some more details about what you're doing? Perhaps share the CLI command or API you're calling or the CloudFormation template?

  • We are using Aws Java SDK to create a network interface Below is a code snippet:

    var request = CreateNetworkInterfaceRequest.builder().description(networkInterface.getName()) .subnetId(networkInterface.getSubnet().getId()).clientToken(clientToken) .groups(groups);

            if (!(networkInterface.getInterfaceType() == null || networkInterface.getInterfaceType().isBlank())) {
                request.interfaceType(networkInterface.getInterfaceType());
            }
    

    The interface type is "interface" in this case. The strange thing this works for all aws accounts that we use for our testing except one specific one for which we are getting the above error.

    We wanted to understand in which scenarios such an error occurs? Is the interfacetype value account specific? If not why it fails for one account and not for others. As per the AWS documentation "interface" is a valid interfaceType value

Mohit
已提問 6 個月前檢視次數 167 次
1 個回答
0

According to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#aws-resource-ec2-networkinterface-properties the allowed values for InterfaceType are branch, efa & trunk. But the default value is interface.

In CloudFormation are you specifically setting the value to interface ? If so then what happens if you leave it blank?

profile picture
專家
Steve_M
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南