How to set up security group in vpc only mode in sagemaker?

Viewed 19

I'm setting a vpc only mode in sagemaker studio . based on documentation here https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html, it is stated that "This is required for connectivity between the JupyterServer app and the KernelGateway apps. You must allow access to at least ports in the range 8192-65535." i have set up following security group as below, I understand that these port needs to open for connectivity between the jupyter server and kernel gateway so what should one user for CidrIp instead of 0.0.0.0/0.

SecurityGroup:
        Type: AWS::EC2::SecurityGroup
        Properties:
            GroupDescription: "Open tcp"
            VpcId: !Ref VPC          
            SecurityGroupIngress:
                - IpProtocol: tcp
                  FromPort: 8192
                  ToPort: 65535
                  CidrIp: 0.0.0.0/0   
            SecurityGroupEgress:
                - IpProtocol: tcp
                  FromPort: 8192
                  ToPort: 65535
                  CidrIp: 0.0.0.0/0  
0 Answers
Related