我創建了一個支持請求與AWS這一點,他們的回答如下。我會試一試。
嗨Alistair,
感謝您聯繫AWS高級支持。今天我很高興爲您提供幫助。
我知道您希望從QuickSight連接到您的Prod RDS數據庫,但會出現錯誤:「未驗證」。您還想知道是否有解決方法,看到您的RDS實例不可公開訪問。
亞馬遜網絡服務提供名爲CloudFormation的服務,該服務可幫助自動執行某些流程。 此服務將允許您的RDS實例通過自定義NAT實例連接到QuickSight。因此,您不必將數據庫置於公共子網中。 附加的是CloudFormation模板(NAT_RDS_Provisioning.template),啓動CloudFormation堆棧[1]後,將創建一個實例並創建一個安全組,然後輸入所需的變量。 然後,這將從您定義的源端口上的源地址訪問EC2實例的端點,然後允許QuickSight訪問您的RDS實例服務器而不公開您的RDS實例。
要啓動該CloudFormation堆棧,請參見下面的步驟......請記住,該地區創建這必須是你的數據庫駐留在同一地區。
1. From your AWS console navigate to " CloudFormation "
2. Click " create stack ", you will then be asked to Select Template, you will then select " Design template".
3. Next to Parameters - click " Mappings ", at the bottom of that page you will see: Components and Template.
4. Select " Template " and copy and paste the provided script in there. (see attached: NAT_RDS_Provisioning.template)(Please use case link below signature)
5. In the top right hand corner you will see a refresh button, click to refresh.
6. On the top left there is a square with a tick inside (clicking this validates the template).
7. Once validated - click the little cloud with the arrow in it , this will create the stack.
8. You will be taken back to the select template page, click "next" in the bottom right corner.
9. Under Specify Details, name your stack and then complete all Parameters, info on parameters provided below:
9.1 Stack name (Example: NAT-RDS-QuickSight)
9.2 DestinationAddress - Add your RDS instance Endpoint here. (That way when a fail-over occurs the endpoint should be updated in 60 seconds maximum).
9.3 DestinationPort - The service remote destination port:
9.4 InstanceType - The EC2 instance class. (The size of the NAT instance will depend on the amount of data you want to pull into QuickSight)
9.5 KeyName - Name of an existing EC2 KeyPair to enable SSH access to the instance:
9.6 SourceAddress - The source range you want to allow access from: example 0.0.0.0/0.
9.7 SourcePort - The port the service must listen on:
9.8 Subnet - a Public Subnet that is in the same VPC as your RDS instance:
10. Click " Next "
11. On the Options page - complete the desired fields and click " Next " (Optional)
12. Review all information - (Confirm the details for your NAT EC2 instance)
13. Under template you will see "Estimate cost - click on cost to give you an idea of the monthly estimate to have this service running)
14. Then select " Create " in the bottom right hand corner.
15. On the main CloudFormation Page, click "refresh" You will the notice the status of your Stack being created.
16. If you navigate to your EC2 console you will notice your NAT instance running/creating.
請確保NAT實例有權訪問您的RDS實例,這包括安全組設置。 這應該通過在RDS實例數據庫的安全組中包含NAT實例的IP地址來完成。
然後,您應該能夠以設置方式訪問EC2 IP地址和端口,然後將流量轉發到您的數據庫。
在創建上述內容時,您會看到涉及的估算成本,但是我已經在下面添加了兩個以上的鏈接,以獲取關於此的更多信息以及您的成本計算器。
費用將是相同的EC2實例,這將啓動AWS Linux的最新標準,AMI和吞吐量將通過實例類[2] & [3]確定:
[1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/GettingStarted.Walkthrough.html
[2] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
[3] https://calculator.s3.amazonaws.com/index.html
希望以上信息和解決方案很有幫助。
如果您遇到上述任何困難或者您不確定任何事情,請隨時與我聯繫,我將非常樂意提供幫助。
要查看此通信中包含的名爲「NAT-RDS-Provisioning-Template.template」的文件,請使用簽名下面給出的案例鏈接。
最好的問候,
Delene T. Amazon Web Services的
見所提供的模板文件的內容在這裏:https://pastebin.com/m67sz4bR
注意:從Quicksight連接到數據源時,需要先選擇數據庫類型(例如MySQL或SQL Server,而不是RDS),然後在數據庫服務器中輸入您的NAT實例的公有DNS(端點爲NAT EC2實例)領域。另外取消選擇「啓用SSL」以驗證您的連接。 – Alistair