Skip to content

Commit 773ec7a

Browse files
authored
chore: Update User-Agent string in Lambda Tools for PS (#1739)
1 parent 914746c commit 773ec7a

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-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: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,19 @@ 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+
203+
$userAgent = "lib/AWSLambdaPSCore#$moduleVersion"
204+
if ($env:AWS_EXECUTION_ENV) {
205+
$env:AWS_EXECUTION_ENV += " $userAgent"
206+
} else {
207+
$env:AWS_EXECUTION_ENV = "AWSLambdaPSCore $userAgent"
208+
}
209+
198210
try
199211
{
200212
if ($DisableInteractive)

0 commit comments

Comments
 (0)