"NLB ARN格式错误".为AWS APIGateway创建VPC链接时 [英] "NLB ARN is malformed" when create VPC link for AWS APIGateway

查看:167
本文介绍了"NLB ARN格式错误".为AWS APIGateway创建VPC链接时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照教程创建了到我的私人Elb平衡器的VPC链接. https://docs. aws.amazon.com/apigateway/latest/developerguide/set-up-api-with-vpclink-cli.html

I followed the tutorial to create a VPC link to my private elb balancer. https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-api-with-vpclink-cli.html

但是它失败了,并收到一条错误消息"statusMessage":"NLB ARN格式不正确".

But it failed, and got an error message "statusMessage": "NLB ARN is malformed".

我确实通过elbv2 cli找到了具有相同ARN的ELB,因此该ARN必须是合法的...

I do find the ELB with same ARN by elbv2 cli, so the ARN must be a legal one...

我找不到解决问题的文档. 有人可以帮助我吗?谢谢.

I can't find document to solve the problem. anyone can help me? thank you.

我所做的如下.

$ aws elbv2 describe-load-balancers --load-balancer-arns arn:aws:elasticloadbalancing:ap-northeast-1:846239845603:loadbalancer/app/v2-api-balancer/db49ab0ecaef1de8

{
"LoadBalancers": [
{
"Scheme": "internal",
"SecurityGroups": [
"sg-9282b8f4"
],
"LoadBalancerArn": "arn:aws:elasticloadbalancing:ap-northeast-1:846239845603:loadbalancer/app/v2-api-balancer/db49ab0ecaef1de8",
"State": {
"Code": "active"
},
"CreatedTime": "2017-10-18T04:27:28.780Z",
"VpcId": "vpc-dbe3f2be",
"DNSName": "internal-v2-api-balancer-988454399.ap-northeast-1.elb.amazonaws.com",
"AvailabilityZones": [
{
"SubnetId": "subnet-7642062e",
"ZoneName": "ap-northeast-1c"
},
{
"SubnetId": "subnet-c454fa8d",
"ZoneName": "ap-northeast-1b"
}
],
"IpAddressType": "ipv4",
"Type": "application",
"LoadBalancerName": "v2-api-balancer",
"CanonicalHostedZoneId": "Z14GRHDCWA56QT"
}
]
}


$ aws apigateway create-vpc-link \ 
--name my-test-vpc-link-1 \
--target-arns "arn:aws:elasticloadbalancing:ap-northeast-1:846239845603:loadbalancer/app/v2-api-balancer/db49ab0ecaef1de8" 

{
"name": "my-test-vpc-link-1",
"targetArns": [
"arn:aws:elasticloadbalancing:ap-northeast-1:846239845603:loadbalancer/app/v2-api-balancer/db49ab0ecaef1de8"
],
"id": "7eexgn",
"status": "PENDING"
}


$ aws apigateway get-vpc-link --vpc-link-id 7eexgn

{
"id": "7eexgn",
"targetArns": [
"arn:aws:elasticloadbalancing:ap-northeast-1:846239845603:loadbalancer/app/v2-api-balancer/db49ab0ecaef1de8"
],
"status": "FAILED",
"name": "my-test-vpc-link-1",
"statusMessage": "NLB ARN is malformed"
}


推荐答案

VPC链接必须指向网络LB.看起来您正在尝试使用应用程序LB.

VPC Links must be to a network LB. Looks like you are trying to use an application LB.

https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-nlb-for-vpclink-using-console.html

这篇关于"NLB ARN格式错误".为AWS APIGateway创建VPC链接时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆