Error: Private Link Type AWS_PRIVATE_LINK Is Not Supported
Issue
When using Terraform to set up a MongoDB connection with AWS PrivateLink, the following error appears:
status code: 400; code: InvalidInput; message: Private link type AWS_PRIVATE_LINK is not supported by connector service.
Environment
- Connector: MongoDB
- Infrastructure-as-Code: Terraform
- Connection method: AWS PrivateLink
Resolution
To resolve this issue, don’t use self-service AWS PrivateLink settings for MongoDB connections hosted on AWS.
For MongoDB connectors hosted on AWS, use the following Terraform settings:
- Set
connection_type = "Directly". - Set
hoststo your MongoDB host URL. For example:mongodb+srv://example.mongodb.net/?retryWrites=true&w=majority... - Set
private_link_id = "". - Don't set
connection_type = "PrivateLink"or specify aprivate_link_idfor MongoDB connections on AWS.
If the customer-side networking is already provisioned, Fivetran automatically detects the existing AWS PrivateLink during connection setup.
This guidance applies only to MongoDB connections on AWS. For connectors that support self-service AWS PrivateLink, such as PostgreSQL or MySQL, continue to set connection_type = "PrivateLink" and specify private_link_id.
Cause
This issue occurs when you use connection_type = "PrivateLink" with a MongoDB connection on AWS. Fivetran doesn't support self-service AWS PrivateLink for MongoDB. Attempting to use connection_type = "PrivateLink" or specifying private_link_id for unsupported connectors such as MongoDB results in the above error.
For more information, see AWS PrivateLink setup instructions for self-service Fivetran accounts.