Aws lambda 无效的模板资源属性';政策';

Aws lambda 无效的模板资源属性';政策';,aws-lambda,amazon-cloudformation,amazon-iam,Aws Lambda,Amazon Cloudformation,Amazon Iam,你能帮我解决这里的问题吗 当我试图运行以下云形成堆栈时,出现了一个错误。我正在尝试使用云形成无效模板资源属性“Policies”创建具有sns角色的lambda函数 AWSTemplateFormatVersion: '2010-09-09' Description: VPC function. Resources: Function: Type: AWS::Lambda::Function Properties:

你能帮我解决这里的问题吗

当我试图运行以下云形成堆栈时,出现了一个错误。我正在尝试使用云形成无效模板资源属性“Policies”创建具有sns角色的lambda函数

  AWSTemplateFormatVersion: '2010-09-09'
    Description: VPC function.
    Resources:
      Function:
        Type: AWS::Lambda::Function
        Properties:
          Handler: index.handler
          Code:
            S3Bucket: teste-artifact-bucket
            S3Key: function.zip
          Runtime: python3.6
          Timeout: 5
          TracingConfig:
            Mode: Active
      LambdaExecutionRole:
        Description: Creating service role in IAM for AWS Lambda
        Type: AWS::IAM::Role
        Properties:
          RoleName:
            Fn::Sub: ${ProjectId}-execution
          AssumeRolePolicyDocument:
            Statement:
            - Effect: Allow
              Principal:
                Service:
                - lambda.amazonaws.com
              Action: sts:AssumeRole
          Path: /
        Policies:
          PolicyName: Lamda addtional access 
            PolicyDocument:
              Version: 2012-10-17
              Statement:
                - Effect: Allow
                  Action:
                  - sns:Subscribe
                  - sns:Publish
                  - sns:CreateTopic
                  - logs:PutLogEvents
                  - logs:CreateLogStream
                  - logs:CreateLogGroup
                  Resource: '*'
          ManagedPolicyArns:
            - !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole'
      LambdaFunctionLogGroup:
        Type: AWS::Logs::LogGroup
        Properties:
          LogGroupName: !Sub '/aws/lambda/${ProjectId}'
          RetentionInDays: 60

策略
代码块缩进不足