Error: Unable to upload artifact PitchAiIngest referenced by CodeUri parameter of PitchAiIngest resource

Error: Unable to upload artifact PitchAiIngest referenced by CodeUri parameter of PitchAiIngest resource

A​​WS Lambda 函数还很新,现在是我亲自动手的时候了。当我想 docker 构建我的函数时,我在标题中遇到了这个错误。这是我配置函数的方式:

  PitchAiIngest:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: !Sub pitch-ai-ingest-${Environment}
      Handler: lambda_function.lambda_handler
      Runtime: python3.7
      CodeUri: pitchai_ingest/
      Description: get pitchai information from API and publish to dynamodb
      MemorySize: 128
      Timeout: 900
      Role: !GetAtt LambdaRole.Arn
      Environment:
        Variables:
          LOGGING_LEVEL: INFO
          APP_NAME: pitch-ai-ingest
          APP_ENV: !Ref Environment
          DYNAMO_DB: !Ref PitchAiEventDynamoDBTable
          PLAYER_DB: !Ref PitchAiPlayerDynamoDBTable 
          PITCH_SQS: !Ref PitchAiIngestQueue
      Tags:
        env: !Ref Environment
        service: pitch-ai-service
        function_name: !Sub pitch-ai-ingest-${Environment}

粗略地说,我 post 文件 cfn-tempate.yml 中的上述代码段位于文件夹 pitchai_ingest 的同一目录下(包括 Lambda 处理程序)。

我应该怎么做才能解决它?

我错误地将 AWS_ACCESS_KEY_ID 设置为 AWS_ACCESS_KEY。这就是找不到凭据的原因。