LambdaStartupAttribute support for Configure method. #1688
Answered
by
ashishdhingra
manuquintero
asked this question in
Q&A
|
Hi, Thanks |
Answered by
ashishdhingra
Mar 14, 2024
Replies: 1 comment
|
@manuquintero Good morning. Per my analysis and available documentation,
...
namespace SomeNamespace
{
public class Functions_Add_Generated
{
private readonly ServiceProvider serviceProvider;
public Functions_Add_Generated()
{
SetExecutionEnvironment();
var services = new ServiceCollection();
...
var startup = new LambdaAnnotations_Issue1368.Startup();
startup.ConfigureServices(services);
serviceProvider = services.BuildServiceProvider();
}
public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyResponse Add(Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest __request__, Amazon.Lambda.Core.ILambdaContext __context__)
{
...
}
}
Based on above understanding, I'm unsure if we could configure HTTP request pipeline to invoke Reference example (using both programming models): https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/cross-service/PhotoAssetManager CCing @normj for validating the findings and any further inputs. Thanks, |
0 replies
Answer selected by
ashishdhingra
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@manuquintero Good morning. Per my analysis and available documentation,
Amazon.Lambda.Annotations.LambdaStartupattribute causes source generation process to invoke <>.ConfigureServices() in the generated code for LambdaFunctions. Below is an example: