Severity
Blocking customers deploying to ECS if you have the container definition image with a packageID defined as a variable, workaround exists.
Version
2026.2.11000
Latest Version
I could reproduce the problem in the latest build
What happened?
Using an ECS Step in Octopus -
If you have a packageID as a variable, Octopus is not evaluating it correctly and therefore generates the error below when trying to deploy:
Amazon.ECS.Model.ClientException: Container.image contains invalid characters.
Hardcoding the packageID or chosing it from the dropdown menu results in the deployment succeeding:
Reproduction
- Have a project with an Update Amazon ECS Service step.
- Use a container definition with a container image from a feed with a package name defined as a variable.
- Save the step, create the release and deploy it.
- See the error.
- Go back to the step and hardcode the packageID in, create a release and deploy, see the ECS service update.
Error and Stacktrace
Amazon.ECS.Model.ClientException: Container.image contains invalid characters.
Wed, May 20th 2026 10:01:49 +01:00 Error ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error --- End of inner exception stack trace ---
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ExceptionHandler`1.HandleAsync(IExecutionContext executionContext, Exception exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.BaseAuthResolverHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Aws.Deployment.Conventions.UpdateEcsServiceConvention.InstallAsync(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Aws\Deployment\Conventions\UpdateEcsServiceConvention.cs:line 71
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Aws.Deployment.Conventions.UpdateEcsServiceConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Aws\Deployment\Conventions\UpdateEcsServiceConvention.cs:line 35
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Deployment.ConventionProcessor.RunInstallConventions(IEnumerable`1 installConventions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 80
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Deployment.ConventionProcessor.RunConventions(Boolean logExceptions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 31
Wed, May 20th 2026 10:01:49 +01:00 Error Container.image contains invalid characters.
Wed, May 20th 2026 10:01:49 +01:00 Error Amazon.ECS.Model.ClientException
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ExceptionHandler`1.HandleAsync(IExecutionContext executionContext, Exception exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.BaseAuthResolverHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Aws.Deployment.Conventions.UpdateEcsServiceConvention.InstallAsync(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Aws\Deployment\Conventions\UpdateEcsServiceConvention.cs:line 71
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Aws.Deployment.Conventions.UpdateEcsServiceConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Aws\Deployment\Conventions\UpdateEcsServiceConvention.cs:line 35
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Deployment.ConventionProcessor.RunInstallConventions(IEnumerable`1 installConventions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 80
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Deployment.ConventionProcessor.RunConventions(Boolean logExceptions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 31
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Aws.Commands.UpdateEcsServiceCommand.Execute(String[] commandLineArguments) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Aws\Commands\UpdateEcsServiceCommand.cs:line 37
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Program.ResolveAndExecuteCommand(IContainer container, CommonOptions options) in C:\BuildAgent\work\62728692c7c35200\source\Calamari\Program.cs:line 86
Wed, May 20th 2026 10:01:49 +01:00 Error at Calamari.Common.CalamariFlavourProgram.Run(String[] args) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\CalamariFlavourProgram.cs:line 76
Wed, May 20th 2026 10:01:49 +01:00 Error --Inner Exception--
Wed, May 20th 2026 10:01:49 +01:00 Error Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
Wed, May 20th 2026 10:01:49 +01:00 Error Amazon.Runtime.Internal.HttpErrorResponseException
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:49 +01:00 Error at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
Wed, May 20th 2026 10:01:50 +01:00 Fatal The remote script failed with exit code 100
Wed, May 20th 2026 10:01:50 +01:00 Fatal The action Update Amazon ECS Service on ECS Target failed
More Information
Initial Customer Ticket (Internal) - https://octopuscd.zendesk.com/agent/tickets/205116
RnD (Internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1779268608337719
Reproduction (Internal) - https://octopus-operations.octopus.app/app#/Spaces-422/projects/aws-ecs/deployments/releases/0.0.29/deployments/Deployments-114715
Workaround
Hardcoding the packageID or choosing it from the dropdown menu results in the deployment succeeding:

Severity
Blocking customers deploying to ECS if you have the container definition image with a packageID defined as a variable, workaround exists.
Version
2026.2.11000
Latest Version
I could reproduce the problem in the latest build
What happened?
Using an ECS Step in Octopus -
If you have a packageID as a variable, Octopus is not evaluating it correctly and therefore generates the error below when trying to deploy:
Amazon.ECS.Model.ClientException: Container.image contains invalid characters.Hardcoding the packageID or chosing it from the dropdown menu results in the deployment succeeding:
Reproduction
Error and Stacktrace
More Information
Initial Customer Ticket (Internal) - https://octopuscd.zendesk.com/agent/tickets/205116
RnD (Internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1779268608337719
Reproduction (Internal) - https://octopus-operations.octopus.app/app#/Spaces-422/projects/aws-ecs/deployments/releases/0.0.29/deployments/Deployments-114715
Workaround
Hardcoding the packageID or choosing it from the dropdown menu results in the deployment succeeding: