java-app-backend/template.yaml [69:120]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              - Effect: Allow
                Action:
                  - rekognition:IndexFaces
                Resource: "*"
              - Effect: Allow
                Action:
                  - dynamodb:PutItem
                Resource:
                  !Join [":", ["arn", "aws", "dynamodb", !Ref "AWS::Region", !Ref "AWS::AccountId", !Join ["-", ["table/face", "id", !Select [0, !Split [-, !Select [2, !Split [/, !Ref AWS::StackId ]]]]]]]]

  BootstrapExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
            Action:
              - sts:AssumeRole
      Path: "/service-role/"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy
      Policies:
        - PolicyName: AmazonRekognition
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - rekognition:CreateCollection
                  - rekognition:DeleteCollection
                  - rekognition:ListCollections
                Resource: "*"
        - PolicyName: AWSLambdaLogs
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - logs:CreateLogGroup
                  - logs:CreateLogStream
                  - logs:PutLogEvents
                Resource: "arn:aws:logs:*:*:*"

  ImageRekognition:
    Type: AWS::Serverless::Function
    Properties:
      Role: !GetAtt LambdaExecutionRole.Arn
      Description: Triggered by S3, indexes faces against a collection in Amazon Rekognition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



python-app-backend/template.yaml [63:114]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              - Effect: Allow
                Action:
                  - rekognition:IndexFaces
                Resource: "*"
              - Effect: Allow
                Action:
                  - dynamodb:PutItem
                Resource:
                  !Join [":", ["arn", "aws", "dynamodb", !Ref "AWS::Region", !Ref "AWS::AccountId", !Join ["-", ["table/face", "id", !Select [0, !Split [-, !Select [2, !Split [/, !Ref AWS::StackId ]]]]]]]]

  BootstrapExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
            Action:
              - sts:AssumeRole
      Path: "/service-role/"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy
      Policies:
        - PolicyName: AmazonRekognition
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - rekognition:CreateCollection
                  - rekognition:DeleteCollection
                  - rekognition:ListCollections
                Resource: "*"
        - PolicyName: AWSLambdaLogs
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - logs:CreateLogGroup
                  - logs:CreateLogStream
                  - logs:PutLogEvents
                Resource: "arn:aws:logs:*:*:*"

  ImageRekognition:
    Type: AWS::Serverless::Function
    Properties:
      Role: !GetAtt LambdaExecutionRole.Arn
      Description: Triggered by S3, indexes faces against a collection in Amazon Rekognition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



