我正在尝试将 PowerShell 核心脚本部署到 AWS Lambda。我正在从 EC2 实例进行部署。
我正在关注PowerShell - AWS Lambda 中的 AWS Lambda 部署包,并尝试部署他们描述的确切脚本。当我运行时,它看起来会起作用:
Publish-AWSPowerShellLambda -ScriptPath .\LambdaPSTest.ps1 -Name LambdaPSTest -Region us-east-1
但后来我收到以下错误。
检索函数 LambdaPSTest 的配置时出错:响应状态代码不指示成功:404(未找到)。
我很困惑为什么它看起来会在该地区出现问题,因为我在调用发布时设置了它。
Error publishing PowerShell Lambda Function: -1
CALLSTACK:
Command Arguments
------- ---------
_deployProject
Publish-AWSPowerShellLambda {{Region=us-east-1$null}, {Region=us-east-1$null}, {Region=us-east-1$null}, {Region=us-ea...
<ScriptBlock> {{=$null}, {=$null}, {=$null}, {=$null}}
At C:\Users\Administrator\Documents\PowerShell\Modules\AWSLambdaPSCore\1.1.0.0\Private\_DeploymentFunctions.ps1:194 char:13
+ throw $msg
+ ~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Error publishin...
:String) [], RuntimeException
+ FullyQualifiedErrorId : Error publishing PowerShell Lambda Function: -1
CALLSTACK:
Command Arguments
------- ---------
_deployProject
Publish-AWSPowerShellLambda {{Region=us-east-1$null}, {Region=us-east-1$null}, {Region=us-east-1$null}, {Region=us-ea...
<ScriptBlock> {{=$null}, {=$null}, {=$null}, {=$null}}