将 PowerShell 脚本发布到 AWS Lambda
Publishing a PowerShell script to AWS Lambda
我正在尝试将 PowerShell 核心脚本部署到 AWS Lambda。我正在从 EC2 实例进行部署。
我正在关注 AWS Lambda Deployment Package in PowerShell - AWS Lambda,并尝试部署他们描述的确切脚本。看起来它会在我 运行:
时起作用
Publish-AWSPowerShellLambda -ScriptPath .\LambdaPSTest.ps1 -Name LambdaPSTest -Region us-east-1
但随后出现以下错误。
Error retrieving configuration for function LambdaPSTest: Response status code does not indicate success: 404 (Not Found).
自从我在调用发布时设置它以来,我很困惑为什么它看起来在该区域上中断。
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.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}}
我认为问题最终与我的企业环境中的安全设置有关。
如果其他人 运行 参与其中,对我有用的是 运行
New-AWSPowerShellLambdaPackage -ScriptPath ./fileUploader.ps1 -OutputPackage fileUploader.zip
然后手动上传到 AWS Lambda
我正在尝试将 PowerShell 核心脚本部署到 AWS Lambda。我正在从 EC2 实例进行部署。
我正在关注 AWS Lambda Deployment Package in PowerShell - AWS Lambda,并尝试部署他们描述的确切脚本。看起来它会在我 运行:
时起作用Publish-AWSPowerShellLambda -ScriptPath .\LambdaPSTest.ps1 -Name LambdaPSTest -Region us-east-1
但随后出现以下错误。
Error retrieving configuration for function LambdaPSTest: Response status code does not indicate success: 404 (Not Found).
自从我在调用发布时设置它以来,我很困惑为什么它看起来在该区域上中断。
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.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}}
我认为问题最终与我的企业环境中的安全设置有关。
如果其他人 运行 参与其中,对我有用的是 运行
New-AWSPowerShellLambdaPackage -ScriptPath ./fileUploader.ps1 -OutputPackage fileUploader.zip
然后手动上传到 AWS Lambda