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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ