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)
Publish-LMFunction-FunctionName <String>-Code_ZipFile <Byte[]>-Handler <String>-Runtime <Runtime>-Role <String>-Publish <SwitchParameter>-LoggingConfig_ApplicationLogLevel <ApplicationLogLevel>-SnapStart_ApplyOn <SnapStartApplyOn>-Architecture <String[]>-CodeSigningConfigArn <String>-ImageConfig_Command <String[]>-Description <String>-ImageConfig_EntryPoint <String[]>-FileSystemConfig <FileSystemConfig[]>-VpcConfig_Ipv6AllowedForDualStack <Boolean>-ImageConfig_IsCommandSet <Boolean>-ImageConfig_IsEntryPointSet <Boolean>-VpcConfig_IsSecurityGroupIdsSet <Boolean>-VpcConfig_IsSubnetIdsSet <Boolean>-Environment_IsVariablesSet <Boolean>-KMSKeyArn <String>-Layer <String[]>-LoggingConfig_LogFormat <LogFormat>-LoggingConfig_LogGroup <String>-MemorySize <Int32>-TracingConfig_Mode <TracingMode>-PackageType <PackageType>-PublishVersion <Boolean>-VpcConfig_SecurityGroupId <String[]>-EphemeralStorage_Size <Int32>-VpcConfig_SubnetId <String[]>-LoggingConfig_SystemLogLevel <SystemLogLevel>-Tag <Hashtable>-DeadLetterConfig_TargetArn <String>-Timeout <Int32>-Environment_Variable <Hashtable>-ImageConfig_WorkingDirectory <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromZipFile
Publish-LMFunction-FunctionName <String>-ZipFilename <String>-Handler <String>-Runtime <Runtime>-Role <String>-Publish <SwitchParameter>-LoggingConfig_ApplicationLogLevel <ApplicationLogLevel>-SnapStart_ApplyOn <SnapStartApplyOn>-Architecture <String[]>-CodeSigningConfigArn <String>-ImageConfig_Command <String[]>-Description <String>-ImageConfig_EntryPoint <String[]>-FileSystemConfig <FileSystemConfig[]>-VpcConfig_Ipv6AllowedForDualStack <Boolean>-ImageConfig_IsCommandSet <Boolean>-ImageConfig_IsEntryPointSet <Boolean>-VpcConfig_IsSecurityGroupIdsSet <Boolean>-VpcConfig_IsSubnetIdsSet <Boolean>-Environment_IsVariablesSet <Boolean>-KMSKeyArn <String>-Layer <String[]>-LoggingConfig_LogFormat <LogFormat>-LoggingConfig_LogGroup <String>-MemorySize <Int32>-TracingConfig_Mode <TracingMode>-PackageType <PackageType>-PublishVersion <Boolean>-VpcConfig_SecurityGroupId <String[]>-EphemeralStorage_Size <Int32>-VpcConfig_SubnetId <String[]>-LoggingConfig_SystemLogLevel <SystemLogLevel>-Tag <Hashtable>-DeadLetterConfig_TargetArn <String>-Timeout <Int32>-Environment_Variable <Hashtable>-ImageConfig_WorkingDirectory <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromS3Object
Publish-LMFunction-FunctionName <String>-Handler <String>-Runtime <Runtime>-Role <String>-Publish <SwitchParameter>-LoggingConfig_ApplicationLogLevel <ApplicationLogLevel>-SnapStart_ApplyOn <SnapStartApplyOn>-Architecture <String[]>-CodeSigningConfigArn <String>-ImageConfig_Command <String[]>-Description <String>-ImageConfig_EntryPoint <String[]>-FileSystemConfig <FileSystemConfig[]>-VpcConfig_Ipv6AllowedForDualStack <Boolean>-ImageConfig_IsCommandSet <Boolean>-ImageConfig_IsEntryPointSet <Boolean>-VpcConfig_IsSecurityGroupIdsSet <Boolean>-VpcConfig_IsSubnetIdsSet <Boolean>-Environment_IsVariablesSet <Boolean>-KMSKeyArn <String>-Layer <String[]>-LoggingConfig_LogFormat <LogFormat>-LoggingConfig_LogGroup <String>-MemorySize <Int32>-TracingConfig_Mode <TracingMode>-PackageType <PackageType>-PublishVersion <Boolean>-Code_S3Bucket <String>-Code_S3Key <String>-Code_S3ObjectVersion <String>-VpcConfig_SecurityGroupId <String[]>-EphemeralStorage_Size <Int32>-VpcConfig_SubnetId <String[]>-LoggingConfig_SystemLogLevel <SystemLogLevel>-Tag <Hashtable>-DeadLetterConfig_TargetArn <String>-Timeout <Int32>-Environment_Variable <Hashtable>-ImageConfig_WorkingDirectory <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>FromImage
Publish-LMFunction-FunctionName <String>-Runtime <Runtime>-Role <String>-Publish <SwitchParameter>-LoggingConfig_ApplicationLogLevel <ApplicationLogLevel>-SnapStart_ApplyOn <SnapStartApplyOn>-Architecture <String[]>-CodeSigningConfigArn <String>-ImageConfig_Command <String[]>-Description <String>-ImageConfig_EntryPoint <String[]>-FileSystemConfig <FileSystemConfig[]>-Code_ImageUri <String>-VpcConfig_Ipv6AllowedForDualStack <Boolean>-ImageConfig_IsCommandSet <Boolean>-ImageConfig_IsEntryPointSet <Boolean>-VpcConfig_IsSecurityGroupIdsSet <Boolean>-VpcConfig_IsSubnetIdsSet <Boolean>-Environment_IsVariablesSet <Boolean>-KMSKeyArn <String>-Layer <String[]>-LoggingConfig_LogFormat <LogFormat>-LoggingConfig_LogGroup <String>-MemorySize <Int32>-TracingConfig_Mode <TracingMode>-PackageType <PackageType>-PublishVersion <Boolean>-VpcConfig_SecurityGroupId <String[]>-EphemeralStorage_Size <Int32>-VpcConfig_SubnetId <String[]>-LoggingConfig_SystemLogLevel <SystemLogLevel>-Tag <Hashtable>-DeadLetterConfig_TargetArn <String>-Timeout <Int32>-Environment_Variable <Hashtable>-ImageConfig_WorkingDirectory <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonLambdaConfig>
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) |
Aliases | BucketName, FunctionCode_S3Bucket, S3Bucket |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FunctionCode_S3Key, Key, S3Key |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FunctionCode_S3ObjectVersion, S3ObjectVersion, VersionId |
Required? | False |
Position? | 2 |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ZipContent, ZipFileContent |
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? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Environment_Variables |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | FileSystemConfigs |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | 3 |
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? | 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? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Layers |
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? | 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? | 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? | 5 |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | 4 |
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? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Tags |
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? | 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 | VpcConfig_SecurityGroupIds |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | VpcConfig_SubnetIds |
Required? | True |
Position? | 2 |
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 |
Publish-LMFunction -Description "My C# Lambda Function" `
-FunctionName MyFunction `
-ZipFilename .\MyFunctionBinaries.zip `
-Handler "AssemblyName::Namespace.ClassName::MethodName" `
-Role "arn:aws:iam::123456789012:role/LambdaFullExecRole" `
-Runtime dotnetcore1.0 `
-Environment_Variable @{ "envvar1"="value";"envvar2"="value" }
CodeSha256 : /NgBMd...gq71I=
CodeSize : 214784
DeadLetterConfig :
Description : My C# Lambda Function
Environment : Amazon.Lambda.Model.EnvironmentResponse
FunctionArn : arn:aws:lambda:us-west-2:123456789012:function:ToUpper
FunctionName : MyFunction
Handler : AssemblyName::Namespace.ClassName::MethodName
KMSKeyArn :
LastModified : 2016-12-29T23:50:14.207+0000
MemorySize : 128
Role : arn:aws:iam::123456789012:role/LambdaFullExecRole
Runtime : dotnetcore1.0
Timeout : 3
Version : $LATEST
VpcConfig :This example creates a new C# (dotnetcore1.0 runtime) function named MyFunction in AWS Lambda, providing the compiled binaries for the function from a zip file on the local file system (relative or absolute paths may be used). C# Lambda functions specify the handler for the function using the designation AssemblyName::Namespace.ClassName::MethodName. You should replace the assembly name (without .dll suffix), namespace, class name and method name parts of the handler spec appropriately. The new function will have environment variables 'envvar1' and 'envvar2' set up from the provided values.
Write-S3Object -BucketName mybucket -Key MyFunctionBinaries.zip -File .\MyFunctionBinaries.zip
Publish-LMFunction -Description "My C# Lambda Function" `
-FunctionName MyFunction `
-BucketName mybucket `
-Key MyFunctionBinaries.zip `
-Handler "AssemblyName::Namespace.ClassName::MethodName" `
-Role "arn:aws:iam::123456789012:role/LambdaFullExecRole" `
-Runtime dotnetcore1.0 `
-Environment_Variable @{ "envvar1"="value";"envvar2"="value" }This example is similar to the previous one except the function binaries are first uploaded to an Amazon S3 bucket (which must be in the same region as the intended Lambda function) and the resulting S3 object is then referenced when creating the function.
AWS Tools for PowerShell: 2.x.y.z