This message was deleted.
# aws
s
This message was deleted.
p
i do something like this too, i basically create a dictionary of my environment variables, and then pass them in to my lambda like this:
Copy code
environment: {
        variables: {
         SHARED_VAR_1: value1,
         SHARED_VAR_2: value2,
         ...lambdaSpecificDictionary,
        },
      },
d
The issue with that is that there's lots of logic that's grouped together, some of which depends on the Lambda Function object being instantiated -- so I would need to split the code within the conditional block up, which is inelegant because I'm repeating the condition