Reputation: 4388
I have defined several environment variables in my AWS Lambda but when I try and access them in my .Net code they are coming in as blank.What am I missing?
Source Code:
public void CalculateInterimReviewsToBeCreated(Input input, ILambdaContext context)
{
var uri = new Uri(getFSRHistoryURL);
using (var httpClient = new HttpClient { BaseAddress = uri })
{
var authenticationHeaderKey = System.Environment.GetEnvironmentVariable("AuthenticationHeaderKey");
LambdaLogger.Log("CalculateInterimReviewsToBeCreated : authenticationHeaderKey" + authenticationHeaderKey);
...
}
...
}
CloudWatch shows blank environment variable:
Lambda function configuration shows configured environment variable:
Upvotes: 2
Views: 1917
Reputation: 1479
You have specified Environment Variables in the tag section and hence the problem. You have to specify variables in the Environment Variable section.
Upvotes: 4