簡體   English   中英

從另一個 vpc(帳戶 B)中的 lambda 訪問 vpc(帳戶 A)中的 redshift

[英]access redshift which is in vpc(Account A) from lambda which in another vpc (account B)

Account-B:包含 vpc(vpc-B) 中的 RDS,具有 4 個安全組。 我使用以下策略為賬戶 A 創建了承擔角色:

[![在此處輸入圖片描述][1]][1]

[![在此處輸入圖像描述][2]][2]

在賬戶-A 中:

i created lambda function to get connection with redshift (i tested this code from lambda in same account and vpc also then i worked fine i..e nothing wrong in coding part ) in acccount-A (in vpc-A) and this lambda function保存在 2 個私有子網中,並將 igw 附加到 vpc,並且帶有 igw-ip 和 nat-gateway-ip 映射的路由表已正確完成。(大多數 vpc 對等部分是完美的(還包括安全組入站和出站規則)

此 function 附帶角色:

[![在此處輸入圖像描述][3]][3]

在這里測試 lambda function 在帳戶 A 中給出以下錯誤:超時錯誤

有什么建議么?

謝謝

這是因為有問題的 Redshift 集群位於公共子網中,且可公開訪問設置為 true。

To resolve the Lambda function connecting to the Redshift cluster, the Redshift security group added an inbound rule allowing the elastic IP address of the NAT Gateways for the Lambda subnets to be able to connect.

作為一項改進建議,可以將 Redshift 集群移動到私有子網中,並在其他已設置的對等連接中發生連接。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM