3

新しいラムダ関数がまだ存在しない場合は、公開しようとしています。アップデートがうまくいっているように見えます。私は自由にアップデートできます。私は、コマンドを発行しないしようとすると、しかし、私は、私はすべてのパラメータなしで公開-LMFunctionを実行して、手動で物事を入力した場合、私はまだエラーを取得エラーにMember must not be nullAWSでラムダ関数を公開

$zipFilePath = "E:\ProductName-Dev\release.zip" 
$zipFileItem = Get-Item -Path $zipFilePath 
$fileStream = $zipFileItem.OpenRead() 
$memoryStream = New-Object System.IO.MemoryStream 
$fileStream.CopyTo($memoryStream) 

$cmdOutput = Get-LMFunction -FunctionName new-extract; 

try{ 
    if($?) { 
     "lambda function already in AWS"    
     Update-LMFunctionCode -FunctionName new-extract -ZipFile $memoryStream -Publish 1 

    } else { 
     "need to publish new lambda function"   
     Publish-LMFunction -FunctionName new-extract -FunctionZip $zipFilePath -Handler exports.handler -Role arn:aws:iam::0000000:role/my-extract -Region us-east-1 
    } 
} 
finally { 
    $fileStream.Close() 
} 

を得続けます。私は何かを明らかにしていますか?私は私のすべての4つのフィールドが私の出版機能に追加されていると思う。私はwebconsole内でこれらを作成することもできるので、資格証明の問題ではないと思います。

答えて

3

私は単純にランタイムパラメータに

Publish-LMFunction -FunctionName $FunctionName -FunctionZip $zipFilePath -Handler exports.handler -Role arn:aws:iam:$AccountNumber:role/$RoleName -Region $Region -Runtime nodejs4.3 

彼らのマニュアルを参照して行方不明になったことは、必要に応じてそれを示していますが、PowerShellのISEに書いているときには、フィールドでアスタリスクを入れていません。