Serverless Framework: UpdateFunctionCode 操作のリクエストは 69905067 バイト未満である必要があります 質問する

Serverless Framework: UpdateFunctionCode 操作のリクエストは 69905067 バイト未満である必要があります 質問する

私は次のような圧縮ファイルをアップロードするパッケージを使用しています

frameworkVersion: "=1.27.3"

service: recipes

provider:
  name: aws
  endpointType: REGIONAL
  runtime: python3.6
  stage: dev
  region: eu-central-1
  memorySize: 512
  deploymentBucket:
    name: dfki-meta
  versionFunctions: false
  stackTags:
    Project: DFKIAPP
  # Allows updates to all resources except deleting/replacing EC2 instances
  stackPolicy:
    - Effect: Allow
      Principal: "*"
      Action: "Update:*"
      Resource: "*"
    - Effect: Deny
      Principal: "*"
      Action:
        - Update: Replace
        - Update: Delete
      Resource: "*"
      Condition:
        StringEquals:
          ResourceType:
            - AWS::EC2::Instance
  # Access to RDS and S3 Bucket
  iamRoleStatements:
    -  Effect: "Allow"
       Action: "s3:ListBucket"
       Resource: "*"


package:
  individually: true

functions:
#  get_recipes:
#    handler: handler.get_recipes
#    module: recipes_crud
#    package:
#      individually: true
#    timeout: 30
#    events:
#      - http:
#          path: recipes
#          method: get
#          request:
#            parameters:
#              querystring:
#                persona: true

  get_recommendation:
    handler: handler.get_recommendation
    module: recipes_ml
    package:
      artifact: zipped_dir.zip
    timeout: 30
    events:
      - http:
          path: recipes/{id}
          method: get
          request:
            parameters:
              paths:
                id: true
              querystring:
                schaerfe_def: true
                saettig_def: true
                erfahrung_def: true
                schaerfe_wunsch: true
                saettig_wunsch: true
                erfahrung_wunsch: true
                gericht_wunsch: true
                stimmung_wunsch: true

このエラーが理解できません。52.18 は 69905067 バイト未満ではないのですか?

(node:50928) ExperimentalWarning: The fs.promises API is experimental
Serverless: Packaging function: get_recommendation...
Serverless: Uploading function: get_recommendation (52.18 MB)...

  Serverless Error ---------------------------------------

  Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           10.1.0
     Serverless Version:     1.27.3

ベストアンサー1

これは、サーバーレスを使用して個々の Lambda 関数をアップロードするときにのみ問題になるようですが、--function パラメータを指定せずにフルスタックをデプロイすると、正常に動作します。

おすすめ記事