public void Deploy() { var environmentVariables = new Dictionary <string, string> { { "ELASTICSEARCH_API_KEY_GONZALEZ_ART_FOUNDATION_ADMIN", Environment.GetEnvironmentVariable("ELASTICSEARCH_API_KEY_GONZALEZ_ART_FOUNDATION_ADMIN") }, { "ELASTICSEARCH_API_ENDPOINT_FOUNDATION", Environment.GetEnvironmentVariable("ELASTICSEARCH_API_ENDPOINT_FOUNDATION") } }; var scheduledFrequencyInMinutes = 15; var increment = scheduledFrequencyInMinutes == 1 ? "minute" : "minutes"; var scheduleExpression = $"rate({scheduledFrequencyInMinutes} {increment})"; new LambdaDeploy().Deploy( GalleryAwsCredentialsFactory.CreateCredentials(), new List <RegionEndpoint> { RegionEndpoint.USEast1 }, environmentVariables, scheduleExpression, "gonzalez-art-foundation-DistributedProcessor", @"C:\Users\peon\Desktop\projects\gonzalez-art-foundation-api\DistributedProcessor\DistributedProcessor.csproj", new LambdaEntrypointDefinition { AssemblyName = "DistributedProcessor", Namespace = "DistributedProcessor", ClassName = "Function", FunctionName = "FunctionHandler" }, roleArn: "arn:aws:iam::283733643774:role/lambda_exec_art_api", runtime: Runtime.Dotnetcore31, 8192, 1, TimeSpan.FromMinutes(15)); }
public void DeleteAllFunctions() { new LambdaDeploy().Delete( GalleryAwsCredentialsFactory.CreateCredentials(), Regions, FUNCTION_INDEX_AD_HOME, 100 ); }