Skip to content

Commit 508aafd

Browse files
committed
Use default lambda configuration
1 parent 76913dd commit 508aafd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/api/Elastic.Documentation.Api.Lambda/Elastic.Documentation.Api.Lambda.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<AssemblyName>bootstrap</AssemblyName>
1111
<AWSProjectType>Lambda</AWSProjectType>
12+
<!-- Configured for Lambda Function URLs with CloudFront OAC -->
1213

1314
<IsPublishable>true</IsPublishable>
1415
<PublishAot>true</PublishAot>

src/api/Elastic.Documentation.Api.Lambda/Program.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information
44

55
using System.Text.Json.Serialization;
6-
using Amazon.Lambda.APIGatewayEvents;
76
using Amazon.Lambda.Serialization.SystemTextJson;
87
using Elastic.Documentation.Api.Core.AskAi;
98
using Elastic.Documentation.Api.Core.Search;
@@ -49,7 +48,7 @@
4948
process.Refresh();
5049
Console.WriteLine($"Elastic OTel configured. Memory: {process.WorkingSet64 / 1024 / 1024} MB");
5150

52-
_ = builder.Services.AddAWSLambdaHosting(LambdaEventSource.RestApi, new SourceGeneratorLambdaJsonSerializer<LambdaJsonSerializerContext>());
51+
_ = builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi);
5352
process.Refresh();
5453
Console.WriteLine($"AWS Lambda hosting configured. Memory: {process.WorkingSet64 / 1024 / 1024} MB");
5554

@@ -83,8 +82,6 @@
8382
throw;
8483
}
8584

86-
[JsonSerializable(typeof(APIGatewayProxyRequest))]
87-
[JsonSerializable(typeof(APIGatewayProxyResponse))]
8885
[JsonSerializable(typeof(AskAiRequest))]
8986
[JsonSerializable(typeof(SearchRequest))]
9087
[JsonSerializable(typeof(SearchResponse))]

0 commit comments

Comments
 (0)