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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠