Custom hosts file on Lambda image

0

I need to add an entry into /etc/hosts file when running a lambda function using an ECR image. In ECS I can use the HostEntry property, but I can't found any similar option on Lambda. Is there any way to modify this file?

Thank you!

已提问 2 年前560 查看次数
1 回答
0

Lambda filesystem is read-only, except /tmp

So you cannot change the content of /etc/hosts at runtime

Instead, you can change the content during image build-time if you know the value upfront.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则