Skip to content

Commit baaad4d

Browse files
committed
chore: Update User-Agent string in Lambda Tools for PS
1 parent 3de6e26 commit baaad4d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

PowerShell/Module/AWSLambdaPSCore.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AWSLambdaPSCore.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '4.0.0.0'
15+
ModuleVersion = '4.0.1.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'

PowerShell/Module/Private/_DeploymentFunctions.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,15 @@ function _deployProject
194194

195195
$amazonLambdaToolsPath = _configureAmazonLambdaTools
196196

197-
$env:AWS_EXECUTION_ENV="AWSLambdaPSCore"
197+
$moduleVersion = "Unknown"
198+
$module = $MyInvocation.MyCommand.Module
199+
if ($module) {
200+
$moduleVersion = $module.Version.ToString()
201+
}
202+
# The leading and trailing whitespaces are intentional
203+
$userAgent = " lib/AWSLambdaPSCore#$moduleVersion "
204+
205+
$env:AWS_EXECUTION_ENV=$userAgent
198206
try
199207
{
200208
if ($DisableInteractive)

0 commit comments

Comments
 (0)