Programmatically setting Inbound rule of Security group as local IP using CloudFormation

0

Hi Team, I am trying to change the CloudFormation stack of Redshift which has security group inbound rule as 0.0.0.0/32 which is a violation of my requirement. Can I programmatically set this to my local IP( same way as we choose source as my IP in AWS console)? If yes, please help me on the steps to do so.

2개 답변
0

Yes you can specify a more granular ingress security group rule. The Redshift Cloudformation Cluster Security Group Ingress page provides the appropriate guidance on how to add that parameter to your Cloudformation template and some examples.

AWS
답변함 2년 전
  • Hi Allison_P, Thank you so much for the reply. I have gone through the link but every time, the user needs to hardcode whenever they run the stack. But, the requirement here is the stack automatically fetch the IP of user system i.e., Whoever runs it, it should fetch and update the value instead of hardcoding. Please guide me here if you have any other views on the approach.

0

You can create a custom AWS Cloudformation resource which would enable you to run a script, AWS Lambda function, or other automation to acquire the IP Address and store that as an output variable that the Redshift template could use in its deployment. A blog post demonstrating the use of custom Cloudformation resources is available here

AWS
답변함 2년 전

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

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

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