Skip to content

LambdaStartupAttribute support for Configure method. #1688

Answered by ashishdhingra
manuquintero asked this question in Q&A
Discussion options

You must be logged in to vote

@manuquintero Good morning. Per my analysis and available documentation,

  • Lambda annotations relies on source generators to translate your annotated Lambda functions to the regular Lambda programming model (refer https://aws.amazon.com/blogs/developer/net-lambda-annotations-framework/).
  • Decorating a class with Amazon.Lambda.Annotations.LambdaStartup attribute causes source generation process to invoke <>.ConfigureServices() in the generated code for LambdaFunctions. Below is an example:
...
namespace SomeNamespace
{
    public class Functions_Add_Generated
    {
        private readonly ServiceProvider serviceProvider;

        public Functions_Add_Generated()
        {
            SetEx…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ashishdhingra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants