static ServiceKeyCheckAttribute() { if (!RuntimeInfo.IsLambda()) { _serviceKey = "hi"; return; } using (var ssmClient = new AmazonSimpleSystemsManagementClient()) { var task = ssmClient.GetParameterAsync(new GetParameterRequest() { Name = _ifTTTSvcHeaderName, WithDecryption = false }); _serviceKey = task.GetAwaiter().GetResult().Parameter.Value; logger.Info($"obtained {_ifTTTSvcHeaderName} from SSM"); } }