DNS Issue when deploying

Been smacking my head on the table trying to figure out why this is happening. But I finally figured out the issue, however, I am not sure how to resolve it.

Every time I tried deploying a function I would run into the deploy script timing out here:

Serverless: Installing requirements of requirements.txt in .serverless…
Serverless: Docker Image: lambci/lambda:build-python3.6

After some packet traces etc, I figured out something in the deployment process is trying to resolve dns against google’s dns at

The reason this was problematic is because I force dns requests to be from 2 internal servers only. I confirmed this by temporarily opening up to allow all DNS requests going out and the deployment completed.

What might be a fix for this so that I don’t need to create explicit allowances?