aws-remediate-cis-securityhub/cft/aws-cis-securityhubactions.yml [1976:2023]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                      DocumentVersion='1', # default
                      Parameters={
                          'FlowLogRoleArn': [ FlowLogRoleArn ],
                          'CloudWatchLogGroupArn': [ CloudWatchLogGroupArn ],
                          'CloudWatchLogGroupName': [ CloudWatchLogGroupName ],
                          'VpcId': [ VpcId ]
                      }
                  )

              except Exception as e:
                  print(e)
                  print("SSM automation execution error")
                  raise

  VPCFlowLogsEnabledLambdaRole:
    Type: AWS::IAM::Role
    Properties:
      Policies:
      - PolicyName: VPCFlowLogsEnabledLambdaPolicy
        PolicyDocument:
          Version: 2012-10-17
          Statement:
          - Effect: Allow
            Action:
            - cloudwatch:PutMetricData
            Resource: '*'
          - Effect: Allow
            Action:
            - ssm:StartAutomationExecution
            - logs:CreateLogGroup
            - logs:CreateLogStream
            - logs:PutLogEvents
            - logs:DescribeLogGroups
            - iam:PassRole
            - ec2:*
            Resource: '*'
          - Effect: Allow
            Action:
            - cloudtrail:UpdateTrail
            - securityhub:UpdateFindings
            Resource: '*'
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal: { Service: lambda.amazonaws.com }
          Action:
          - sts:AssumeRole
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-remediate-pci-securityhub/cft/aws-security-hub-pci-remediations-template2.yml [3252:3299]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                      DocumentVersion='1', # default
                      Parameters={
                          'FlowLogRoleArn': [ FlowLogRoleArn ],
                          'CloudWatchLogGroupArn': [ CloudWatchLogGroupArn ],
                          'CloudWatchLogGroupName': [ CloudWatchLogGroupName ],
                          'VpcId': [ VpcId ]
                      }
                  )

              except Exception as e:
                  print(e)
                  print("SSM automation execution error")
                  raise

  VPCFlowLogsEnabledLambdaRole:
    Type: AWS::IAM::Role
    Properties:
      Policies:
      - PolicyName: VPCFlowLogsEnabledLambdaPolicy
        PolicyDocument:
          Version: 2012-10-17
          Statement:
          - Effect: Allow
            Action:
            - cloudwatch:PutMetricData
            Resource: '*'
          - Effect: Allow
            Action:
            - ssm:StartAutomationExecution
            - logs:CreateLogGroup
            - logs:CreateLogStream
            - logs:PutLogEvents
            - logs:DescribeLogGroups
            - iam:PassRole
            - ec2:*
            Resource: '*'
          - Effect: Allow
            Action:
            - cloudtrail:UpdateTrail
            - securityhub:UpdateFindings
            Resource: '*'
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal: { Service: lambda.amazonaws.com }
          Action:
          - sts:AssumeRole
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



