首页 > 解决方案 > 无服务器错误 ----- 实体名称中的无效字符行:0 列:382 字符:= 在 ap-south-1 区域中部署 lambda 函数时

问题描述

serverless: Excluding development dependencies…
Serverless: Injecting required Python packages to package…
Serverless: Creating Stack…
Serverless: Checking Stack create progress…
CloudFormation - CREATE_IN_PROGRESS - AWS::CloudFormation::Stack - test-serverless-dev
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::BucketPolicy - ServerlessDeploymentBucketPolicy
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::BucketPolicy - ServerlessDeploymentBucketPolicy
CloudFormation - CREATE_COMPLETE - AWS::S3::BucketPolicy - ServerlessDeploymentBucketPolicy
CloudFormation - CREATE_COMPLETE - AWS::CloudFormation::Stack - test-serverless-dev
Serverless: Stack create finished…
Serverless Error ----------------------------------------
Invalid character in entity name
Line: 0
Column: 382
Char: =
Your Environment Information ---------------------------
Operating System: linux
Node Version: 14.16.0
Framework Version: 2.31.0
Plugin Version: 4.5.2
SDK Version: 4.2.2

**Edit: Adding Serverless.yml below**
service: testserverless
frameworkVersion: '2'
provider:
  name: aws
  runtime: python3.6
  lambdaHashingVersion: 20201221
  region: ap-south-1
functions:
  myfunc:
    handler: main_nise_plus_train.train_handler
    timeout: 30
custom:
  pythonRequirements:
    dockerizePip: non-linux
    zip: true
    slim: true
plugins:
  - serverless-python-requirements

无服务器.yml

相同的部署在其他 aws 区域中不会出现此错误,并且部署成功。此错误的任何解决方案?请让我知道如何解决。谢谢

标签: aws-lambdaserverless-framework

解决方案


推荐阅读