cloudformation.yaml [282:324]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  DocumentDBSecretPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: !Sub ${AWS::StackName}-DocumentDBSecretPolicy
      Roles: 
        - !Ref SageMakerRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - 
            Effect: Allow
            Action:
              - secretsmanager:GetSecretValue
            Resource: !Ref DocDBSecret

  SageMakerNotebookInstance:
    Type: AWS::SageMaker::NotebookInstance
    Properties: 
      InstanceType: !Ref SageMakerInstanceType
      NotebookInstanceName: !Sub ${AWS::StackName}-SageMakerInstance
      RoleArn: !GetAtt SageMakerRole.Arn
      DirectInternetAccess: Enabled
      LifecycleConfigName: !GetAtt SageMakerNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleConfigName
      SecurityGroupIds: 
        - !Ref DocumentDBSecurityGroup
      SubnetId: !Ref PublicSubnetOne
      Tags:
        - Key: Name
          Value: !Sub ${AWS::StackName}-SageMakerInstance
      VolumeSizeInGB: 5
    DependsOn: DocumentDBCluster

  SageMakerNotebookInstanceLifecycleConfig:
    Type: "AWS::SageMaker::NotebookInstanceLifecycleConfig"
    Properties:
      OnStart:
        - Content:
            Fn::Base64: 
              !Sub |
                #!/bin/bash
                sudo -u ec2-user -i <<'EOF'
                source /home/ec2-user/anaconda3/bin/activate python3
                pip install --upgrade pymongo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



rekognition/cloudformation.yaml [326:368]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  DocumentDBSecretPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: !Sub ${AWS::StackName}-DocumentDBSecretPolicy
      Roles: 
        - !Ref SageMakerRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - 
            Effect: Allow
            Action:
              - secretsmanager:GetSecretValue
            Resource: !Ref DocDBSecret

  SageMakerNotebookInstance:
    Type: AWS::SageMaker::NotebookInstance
    Properties: 
      InstanceType: !Ref SageMakerInstanceType
      NotebookInstanceName: !Sub ${AWS::StackName}-SageMakerInstance
      RoleArn: !GetAtt SageMakerRole.Arn
      DirectInternetAccess: Enabled
      LifecycleConfigName: !GetAtt SageMakerNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleConfigName
      SecurityGroupIds: 
        - !Ref DocumentDBSecurityGroup
      SubnetId: !Ref PublicSubnetOne
      Tags:
        - Key: Name
          Value: !Sub ${AWS::StackName}-SageMakerInstance
      VolumeSizeInGB: 5
    DependsOn: DocumentDBCluster

  SageMakerNotebookInstanceLifecycleConfig:
    Type: "AWS::SageMaker::NotebookInstanceLifecycleConfig"
    Properties:
      OnStart:
        - Content:
            Fn::Base64: 
              !Sub |
                #!/bin/bash
                sudo -u ec2-user -i <<'EOF'
                source /home/ec2-user/anaconda3/bin/activate python3
                pip install --upgrade pymongo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



