我正尝试在中国AWS区域中使用无服务器框架部署lambda-我陷入了以下错误。
是否有任何变通办法在serverless.yaml中传递变量?
CloudFormation - UPDATE_ROLLBACK_COMPLETE - AWS::CloudFormation::Stack - aws-china-lambda-Test-Env Serverless: Operation failed! Serverless: View the full error output: https://cn-north-1.console.aws.amazon.com/cloudformation/home?region=cn-north-1#/stack/detail?stackId=arn%3Aaws-cn%3Acloudformation%3Acn-north-1%XXXXX%3Astack%2Faws-china-lambda-Test-Env%2Fc9228230-72e5-11e9-a846-XXXX Serverless
Error ---------------------------------------
An error occurred: QueueAlertLambdaFunction - EnvironmentVariablesFeature is not supported in cn-north-1 region. For more information, please visit the AWS Lambda documentation on Environment Variables. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: a19ca4e3-XXX-11e9-adef-XXXXX).
答案 0 :(得分:2)
这在中国地区确实是一个限制(请参见AWS Lambda)
AWS Lambda在中国的AWS服务实现在以下方面是独特的:
北京和宁夏地区不提供以下AWS Lambda功能:
- Lambda环境变量
解决问题的一种方法是使用旧的无服务器插件,该插件在Lambda中提供此功能之前可以为环境变量提供解决方案,请查看以下内容: