Description
Describe the bug
Our UI application is served up using a .NET Application hosted behind a lambda via API Gateway. This lambda also provides a secure route to our APIs. This lambda uses this package for cookie authentication. Unfortunately the current method PersistKeysToAWSSystemsManager only allows 40 requests per second and this does not scale to meet our needs on our key business day when we need in the region of 300 requests per second.
We need an alternative store for data verification that will solve this problem?
Expected Behavior
That we would be able to create 300 new lambdas every second to meet our concurrency needs
Current Behavior
We are only able to create 40 lambdas per second and are unable to get the desired throughput
Reproduction Steps
In Startup.cs we have the following code
`services.AddRazorPages();
services.AddCors();
services.AddAntiforgery(options => { options.HeaderName = Constants.AntiforgeryHeaderName; });
if (_config["ASPNETCORE_ENVIRONMENT"] == "Development")
{
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(@"DataProtection"));
}
else
{
services.AddDataProtection().PersistKeysToAWSSystemsManager($"{_config["DeployedEnvironment:Name"]}/MyApplication/DataProtection");
}`
This code is then deployed to a lambda that is exposed via API Gateway. When we make 1000 requests per second the lambdas fail to create due to rate limiting in the parameter store.
Possible Solution
Offer an alternative method to PersistKeysToAWSSystemsManager. Perhaps the keys could be persisted to S3 which has a greater allowed throughput.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Targeted .NET Platform
.NET 6
Operating System and version
Windows 10