githubEdit

Building with PowerShell

circle-info

This page was generated from content adapted from the AWS Developer Guidearrow-up-right

Handler

  • Note You're required to use the #Requires statement within your PowerShell scripts to indicate the modules that your scripts depend on. This statement performs two important tasks. 1) It communicates to other developers which modules the script uses, and 2) it identifies the dependent modules that AWS PowerShell tools need to package with the script, as part of the deployment. For more information about the #Requires statement in PowerShell, see About requiresarrow-up-right. For more information about PowerShell deployment packages, see Deploy PowerShell Lambda functions with .zip file archivesarrow-up-right. When your PowerShell Lambda function uses the AWS PowerShell cmdlets, be sure to set a #Requires statement that references the AWSPowerShell.NetCore module, which supports PowerShell Core—and not the AWSPowerShell module, which only supports Windows PowerShell. Also, be sure to use version 3.3.270.0 or newer of AWSPowerShell.NetCore which optimizes the cmdlet import process. If you use an older version, you'll experience longer cold starts. For more information, see AWS Tools for PowerShellarrow-up-right.

Last updated