阅读背景:

AWS Lambda是否使用弹性IP?

来源:互联网 

First my question: are AWS Lambda "instances" using EIP?

首先我的问题是:使用EIP的AWS Lambda“实例”?

My background:

I'm using lambda as solution to reduce my application load of certain task(download youtube videos).

我正在使用lambda作为解决方案来减少我的某些任务的应用程序负载(下载youtube视频)。

In the past I was having problems trying to do this very thing in my ec2 instances, in which I used them with EIP, which always returned limit exceed message, and prompted human captcha verification. I solved this at that time by using the instances without EIP and worked like a charm.

在过去,我在ec2实例中尝试做这件事时遇到了问题,我在其中使用了EIP,它总是返回限制超过消息,并提示人类验证码验证。我当时通过使用没有EIP的实例解决了这个问题并且像魅力一样工作。

Now using lambda for certain videos it throws me Error: Code 150: The uploader has not made this video available in your country. and I double checked that the video was not blocked for US, and it wasn't. So I decided to go back and test with an instance with EIP, and that was it, the same message that was been returned in my lambda function.

现在对某些视频使用lambda它会抛出我错误:代码150:上传者没有在您所在的国家/地区提供此视频。我仔细检查了视频是否被美国封锁,但事实并非如此。所以我决定回去用EIP测试一个实例,就是这个,就是我在lambda函数中返回的相同消息。

It seems to be a change from youtube, because around 3-4 months ago the error when using EIP was limit exceed, but now it turned to country blocked issue. So it's like lambda uses EIP or alike service which youtube doesn't seems to like.

它似乎是来自youtube的变化,因为大约3-4个月前使用EIP时的错误超出限制,但现在它转向国家阻止的问题。所以就像lambda使用EIP或类似的服务,youtube似乎不喜欢。

PS: I'm running my lambda function with nodejs and download the videos with ytdl-core btw.
PS2: I asked this very question in aws forums but no luck so far in a week or so. So I decided to try asking here.

PS:我正在使用nodejs运行我的lambda函数,并使用ytdl-core btw下载视频。 PS2:我在aws论坛上问过这个问题,但到目前为止一周左右没有运气。所以我决定试试这里。

Thanks in advance

提前致谢

1 个解决方案

#1


2  

AWS Lambda is not the same an as EC2 instance. It runs on containers within the AWS infrastructure. Traffic would "appear" to be coming from certain IP addresses, but there is no way to configure which IP address is used.

AWS Lambda与EC2实例不同。它在AWS基础架构内的容器上运行。流量“似乎”来自某些IP地址,但无法配置使用哪个IP地址。

It is possible that the range of "IP addresses from which Lambda appears to come" is not correctly updated in the geo-database used by the video service, and it thinks they are located in a different location.

在视频服务使用的地理数据库中,“Lambda似乎来自的IP地址”的范围可能未正确更新,并且它认为它们位于不同的位置。

Bottom line: There is nothing you can configure.

底线:您无法配置任何内容。


分享到: