AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
FromMemoryStream (Default)
Update-LMFunctionCode-FunctionName <String>-Publish <SwitchParameter>-Architecture <String[]>-DryRun <Boolean>-PublishVersion <Boolean>-RevisionId <String>-ZipFile <Byte[]>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromZipFile
Update-LMFunctionCode-FunctionName <String>-ZipFilename <String>-Publish <SwitchParameter>-Architecture <String[]>-DryRun <Boolean>-PublishVersion <Boolean>-RevisionId <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromImage
Update-LMFunctionCode-FunctionName <String>-Publish <SwitchParameter>-Architecture <String[]>-DryRun <Boolean>-ImageUri <String>-PublishVersion <Boolean>-RevisionId <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromS3Object
Update-LMFunctionCode-FunctionName <String>-Publish <SwitchParameter>-Architecture <String[]>-DryRun <Boolean>-PublishVersion <Boolean>-RevisionId <String>-S3Bucket <String>-S3Key <String>-S3ObjectVersion <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>
Image
, then you must specify the code package in ImageUri
as the URI of a container image in the Amazon ECR registry.
If the function's package type is Zip
, then you must specify the deployment package as a .zip file archive. Enter the Amazon S3 bucket and key of the code .zip file location. You can also provide the function code inline using the ZipFile
field.
The code in the deployment package must be compatible with the target instruction set architecture of the function (x86-64
or arm64
).
The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.
For a function defined as a container image, Lambda resolves the image tag to an image digest. In Amazon ECR, if you update the image tag to a new image, Lambda does not automatically update the function. x86_64
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Architectures |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | False |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BucketName, FunctionCode_S3Bucket |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FunctionCode_S3Key, Key |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FunctionCode_S3ObjectVersion, VersionId |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ZipContent, ZipFileContent |
Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FunctionZip, Filename |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Update-LMFunctionCode -FunctionName MyFunction -ZipFilename .\UpdatedCode.zipUpdates the function named 'MyFunction' with new content contained in the specified zip file. For a C# .NET Core Lambda function the zip file should contain the compiled assembly.
Update-LMFunctionCode -FunctionName MyFunction -BucketName mybucket -Key UpdatedCode.zipThis example is similar to the previous one but uses an Amazon S3 object containing the updated code to update the function.
AWS Tools for PowerShell: 2.x.y.z