Localstack pro does not allow talking to rds in actual aws account

We have an aws account that has an rds instance. We used to connect lambda in localstack to the rds instance. This used to work until recently, when we switched to localstack-pro, it stopped connecting.

I did a dig from the docker container localstack with and without pro enable

I noticed that without pro, the dns resolves to an ec2 in AWS where as with pro, it resolves to localhost 127.0.0.1.

I believe, this is because RDS is only available in pro version and hence it tries to resolve the dns to an rds instance within localstack.

Any way to override this?

Hello,

The DNS resolving to Localstack resources in the Pro Docker image is due to the Transparent Endpoint Injection which resolves AWS domains such as *.amazonaws.com to the Localstack container.

To override this feature, you can use the flag DISABLE_TRANSPARENT_ENDPOINT_INJECTION=1 which will connect the Lambda function to the real AWS API. Please bear in mind that we generally do not recommend connecting to real AWS from within LocalStack.

Additionally, for a more custom setup you can use the flag DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM which lists the domains names that should not be redirected by the Localstack DNS to the LocalStack container, but forwarded to the upstream resolver.