View a markdown version of this page

UpdateService - AWS App Runner

UpdateService

Important

AWS App Runner will no longer be open to new customers starting March 31, 2026. If you would like to use App Runner, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see AWS App Runner availability change.

Update an AWS App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service. These can be set only when you create the service.

To update the tags applied to your service, use the separate actions TagResource and UntagResource.

This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.

Request Syntax

{ "AutoScalingConfigurationArn": "string", "HealthCheckConfiguration": { "HealthyThreshold": number, "Interval": number, "Path": "string", "Protocol": "string", "Timeout": number, "UnhealthyThreshold": number }, "InstanceConfiguration": { "Cpu": "string", "InstanceRoleArn": "string", "Memory": "string" }, "NetworkConfiguration": { "EgressConfiguration": { "EgressType": "string", "VpcConnectorArn": "string" }, "IngressConfiguration": { "IsPubliclyAccessible": boolean }, "IpAddressType": "string" }, "ObservabilityConfiguration": { "ObservabilityConfigurationArn": "string", "ObservabilityEnabled": boolean }, "ServiceArn": "string", "SourceConfiguration": { "AuthenticationConfiguration": { "AccessRoleArn": "string", "ConnectionArn": "string" }, "AutoDeploymentsEnabled": boolean, "CodeRepository": { "CodeConfiguration": { "CodeConfigurationValues": { "BuildCommand": "string", "Port": "string", "Runtime": "string", "RuntimeEnvironmentSecrets": { "string" : "string" }, "RuntimeEnvironmentVariables": { "string" : "string" }, "StartCommand": "string" }, "ConfigurationSource": "string" }, "RepositoryUrl": "string", "SourceCodeVersion": { "Type": "string", "Value": "string" }, "SourceDirectory": "string" }, "ImageRepository": { "ImageConfiguration": { "Port": "string", "RuntimeEnvironmentSecrets": { "string" : "string" }, "RuntimeEnvironmentVariables": { "string" : "string" }, "StartCommand": "string" }, "ImageIdentifier": "string", "ImageRepositoryType": "string" } } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AutoScalingConfigurationArn

The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[\w]+)*:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[0-9]{12}:(\w|\/|-){1,1011}

Required: No

HealthCheckConfiguration

The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.

Type: HealthCheckConfiguration object

Required: No

InstanceConfiguration

The runtime configuration to apply to instances (scaling units) of your service.

Type: InstanceConfiguration object

Required: No

NetworkConfiguration

Configuration settings related to network traffic of the web application that the App Runner service runs.

Type: NetworkConfiguration object

Required: No

ObservabilityConfiguration

The observability configuration of your service.

Type: ServiceObservabilityConfiguration object

Required: No

ServiceArn

The Amazon Resource Name (ARN) of the App Runner service that you want to update.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[\w]+)*:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[0-9]{12}:(\w|\/|-){1,1011}

Required: Yes

SourceConfiguration

The source configuration to apply to the App Runner service.

You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of SourceConfiguration that you originally included when you created the service. Specifically, you can include either CodeRepository or ImageRepository. To update the source configuration, set the values to members of the structure that you include.

Type: SourceConfiguration object

Required: No

Response Syntax

{ "OperationId": "string", "Service": { "AutoScalingConfigurationSummary": { "AutoScalingConfigurationArn": "string", "AutoScalingConfigurationName": "string", "AutoScalingConfigurationRevision": number, "CreatedAt": number, "HasAssociatedService": boolean, "IsDefault": boolean, "Status": "string" }, "CreatedAt": number, "DeletedAt": number, "EncryptionConfiguration": { "KmsKey": "string" }, "HealthCheckConfiguration": { "HealthyThreshold": number, "Interval": number, "Path": "string", "Protocol": "string", "Timeout": number, "UnhealthyThreshold": number }, "InstanceConfiguration": { "Cpu": "string", "InstanceRoleArn": "string", "Memory": "string" }, "NetworkConfiguration": { "EgressConfiguration": { "EgressType": "string", "VpcConnectorArn": "string" }, "IngressConfiguration": { "IsPubliclyAccessible": boolean }, "IpAddressType": "string" }, "ObservabilityConfiguration": { "ObservabilityConfigurationArn": "string", "ObservabilityEnabled": boolean }, "ServiceArn": "string", "ServiceId": "string", "ServiceName": "string", "ServiceUrl": "string", "SourceConfiguration": { "AuthenticationConfiguration": { "AccessRoleArn": "string", "ConnectionArn": "string" }, "AutoDeploymentsEnabled": boolean, "CodeRepository": { "CodeConfiguration": { "CodeConfigurationValues": { "BuildCommand": "string", "Port": "string", "Runtime": "string", "RuntimeEnvironmentSecrets": { "string" : "string" }, "RuntimeEnvironmentVariables": { "string" : "string" }, "StartCommand": "string" }, "ConfigurationSource": "string" }, "RepositoryUrl": "string", "SourceCodeVersion": { "Type": "string", "Value": "string" }, "SourceDirectory": "string" }, "ImageRepository": { "ImageConfiguration": { "Port": "string", "RuntimeEnvironmentSecrets": { "string" : "string" }, "RuntimeEnvironmentVariables": { "string" : "