Skip to content

Commit 6f68cd4

Browse files
committed
Fixed an issue where CodeUri set in Globals section is ignored for AWS::Serverless::Function resource.
1 parent d9670b0 commit 6f68cd4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Amazon.Lambda.Tools/Amazon.Lambda.Tools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<Copyright>Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.</Copyright>
1616
<Product>AWS Lambda Tools for .NET CLI</Product>
1717
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
18-
<Version>5.10.6</Version>
18+
<Version>5.10.7</Version>
1919
</PropertyGroup>
2020
<ItemGroup>
2121
<Content Include="Resources\build-lambda-zip.exe">

src/Amazon.Lambda.Tools/TemplateProcessor/UpdatableResourceDefinition.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static FieldDefinition CreateFieldDefinitionForLambda(bool isServerlessRe
121121
string localPath;
122122
var packageType = s.GetValue(LambdaConstants.CF_LAMBDA_PACKAGE_TYPE);
123123

124-
if(isServerlessResource)
124+
if (isServerlessResource)
125125
{
126126
if (string.Equals(PackageType.Image.Value, packageType, StringComparison.OrdinalIgnoreCase))
127127
{
@@ -134,6 +134,12 @@ public static FieldDefinition CreateFieldDefinitionForLambda(bool isServerlessRe
134134
else
135135
{
136136
localPath = s.GetValue(LambdaConstants.CF_LAMBDA_CODEURI);
137+
138+
// Get value from Globals section for AWS::Serverless::Function
139+
if (string.IsNullOrEmpty(localPath))
140+
{
141+
localPath = s.GetValueFromRoot("Globals", "Function", LambdaConstants.CF_LAMBDA_CODEURI);
142+
}
137143
}
138144
}
139145
else

0 commit comments

Comments
 (0)