How to clear the DNS cache of an instance in AWS Lambda?
Context:
We backup the database to an external S3 provider. It has worked for few years now.
Recently they did a maintenance and added some proxies servers and renewed their SSL certificates (20 april) and since then (5 days later) I'm still getting the error:
Copying zip failed because: Could not connect to disk s3-infomaniak because: GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: s3.swiss-backup02.infomaniak.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://s3.swiss-backup02.infomaniak.com/default?list-type=2&prefix=database-backup%2F&delimiter=%2F
We suppose that the DNS cache is still pointing to the old destination.
- The website is managed with Laravel vapor: https://vapor.laravel.com
- I confirm the S3 is resolvable from our AWS EC2 and from my machine
- The backups works from the EC2 and from my machine
- With or without the NAT, it doesn't change anything
- Redeploying didn't change anything