Skip to content

Amazon.CloudWatchLogs.Model.InvalidParameterException: 2 validation errors detected: Value '' at 'logGroupNamePrefix' failed to satisfy constraint: Member must have length greater than or equal to 1;

0

my .net application deploy on fargate write this log to aws-logger-errors.txt alot. Do you know what is wrong? I still can see the log on the cloudwatch

Log Entry : 11/20/2025 04:14:11 : :Amazon.CloudWatchLogs.Model.InvalidParameterException: 2 validation errors detected: Value '' at 'logGroupNamePrefix' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'logGroupNamePrefix' failed to satisfy constraint: Member must satisfy regular expression pattern: [.-_/#A-Za-z0-9]+ ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown. at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage) at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken) at Amazon.Runtime.Internal.HttpHandler1.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext) --- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream) at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception) at Amazon.Runtime.Internal.ExceptionHandler1.HandleAsync(IExecutionContext executionContext, Exception exception) at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception) at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext) at AWS.Logger.Core.AWSLoggerCore.LogEventTransmissionSetup(CancellationToken token) at AWS.Logger.Core.AWSLoggerCore.Monitor(CancellationToken token)

1 Answer
0

The error you're seeing in your .net application deployed on Fargate is related to CloudWatch Logs configuration. The specific error is an InvalidParameterException that indicates there are validation errors with the logGroupNamePrefix parameter.

The error message shows two validation issues:

  1. The logGroupNamePrefix has a length of zero (empty string), but it must have a length of at least 1 character
  2. The logGroupNamePrefix must match a specific regular expression pattern: [.-_/#A-Za-z0-9]+

This suggests that your application is trying to interact with CloudWatch Logs but hasn't properly specified a log group name or prefix. Even though your logs are still appearing in CloudWatch, this error is occurring when your application's logging framework is trying to perform certain operations with CloudWatch Logs.

To fix this issue, you should:

  1. Check your AWS Logger configuration in your application to ensure you've properly specified a log group name
  2. Make sure the log group name follows the required pattern (can only contain letters, numbers, dots, dashes, underscores, forward slashes, and pound signs)
  3. Verify that your application has the proper IAM permissions to interact with CloudWatch Logs

This is likely happening in your AWS Logger initialization code where the log group name should be specified but is being left empty.
Sources
This AWS::Cognito::LogDeliveryConfiguration resource is in a CREATE_FAILED state because of a regex mismatch? | AWS re:Post
CodePipeline step CodeDeploy using ECS blue/green fails at 'Rerouting production traffic to replacement task set' | AWS re:Post

answered a year ago

EXPERT

reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Relevant content