Accessing AWS Secrets Manager from Redshift cluster

0

Hi, is there any possibility to access a secret and its content, stored in AWS Secrets Manager using a sql query from a Redshift cluster?

2개 답변
2
수락된 답변

You can use Lambda UDFs to retrieve AWS Secret Manager secret's information using SQL statements in Redshift.

  1. Create a lambda function that takes secret ARN as input and returns the required information from secret as output
  2. Create a Lambda UDF in Redshift to invoke the lambda function using SQL statements

Example provided in this blog shows how to access Amazon DynamoDB using Lambda UDFs. You can access AWS Secret Manager in a similar way. You can follow this blog to understand how to retrieve secret information securely using AWS Lambda

Also, that there are many other alternative ways to retrieve secrets. You can retrieve from AWS console, the AWS CLI (get-secret-value) or using the GetSecretValue API .Please refer to retrieve secrets documentation to know more about these alternatives.

AWS
답변함 일 년 전
AWS
전문가
검토됨 일 년 전
0

Hi,

One option is to use redshift data api (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html), in combination with sdk libraries (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SecretsManager.html) and combine/filter the results.

Hope it helps ;)

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인