Skip to content

Commit d95b3a0

Browse files
Merge pull request #9 from LokeshBaskar/master
Update the Word to PDF sample of the AWS lambda to NET80
2 parents 84e75c9 + a628d10 commit d95b3a0

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

AWS-Lambda/MyLamdaProject/MyLamdaProject/Function.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ public string FunctionHandler(string input, ILambdaContext context)
4949

5050
//Save the PDF document
5151
pdf.Save(stream);
52+
//Releases all resources used by the Word document and DocIO Renderer objects
5253
document.Close();
5354
render.Dispose();
55+
//Closes the PDF document
56+
pdf.Close();
5457
return Convert.ToBase64String(stream.ToArray());
5558
}
5659
/// <summary>

AWS-Lambda/MyLamdaProject/MyLamdaProject/MyLamdaProject.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp2.1</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
55
<AWSProjectType>Lambda</AWSProjectType>
66
</PropertyGroup>

AWS-Lambda/MyLamdaProject/MyLamdaProject/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Mock Lambda Test Tool": {
44
"commandName": "Executable",
55
"commandLineArgs": "--port 5050",
6-
"workingDirectory": ".\\bin\\$(Configuration)\\netcoreapp2.1",
7-
"executablePath": "C:\\Users\\%USERNAME%\\.dotnet\\tools\\dotnet-lambda-test-tool-2.1.exe"
6+
"workingDirectory": ".\\bin\\$(Configuration)\\net8.0",
7+
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe"
88
}
99
}
1010
}

AWS-Lambda/MyLamdaProject/MyLamdaProject/aws-lambda-tools-defaults.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"profile" : "AWSLAMBDA",
1010
"region" : "us-east-2",
1111
"configuration" : "Release",
12-
"framework" : "netcoreapp2.1",
13-
"function-runtime" : "dotnetcore2.1",
12+
"framework" : "net8.0",
13+
"function-runtime" : "dotnet8",
1414
"function-memory-size" : 256,
1515
"function-timeout" : 30,
1616
"function-handler" : "MyLamdaProject::MyLamdaProject.Function::FunctionHandler",

0 commit comments

Comments
 (0)