Updates an existing Express service configuration¶
Description¶
Updates an existing Express service configuration. Modifies container settings, resource allocation, auto-scaling configuration, and other service parameters without recreating the service.
Amazon ECS creates a new service revision with updated configuration and performs a rolling deployment to replace existing tasks. The service remains available during updates, ensuring zero-downtime deployments.
Some parameters like the infrastructure role cannot be modified after service creation and require creating a new service.
Usage¶
ecs_update_express_gateway_service(serviceArn, executionRoleArn,
healthCheckPath, primaryContainer, taskRoleArn, networkConfiguration,
cpu, memory, cpuArchitecture, scalingTarget, taskDefinitionArn)
Arguments¶
-
serviceArn[required] The Amazon Resource Name (ARN) of the Express service to update.
-
executionRoleArnThe Amazon Resource Name (ARN) of the task execution role for the Express service.
-
healthCheckPathThe path on the container for Application Load Balancer health checks.
-
primaryContainerThe primary container configuration for the Express service.
-
taskRoleArnThe Amazon Resource Name (ARN) of the IAM role for containers in this task.
-
networkConfigurationThe network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.
-
cpuThe number of CPU units used by the task.
-
memoryThe amount of memory (in MiB) used by the task.
-
cpuArchitectureThe CPU architecture that the task runs on. If you don't specify a value, the service keeps its current architecture.
Valid values:
X86_64- The x86 64-bit architecture.ARM64- The 64-bit ARM architecture.
Changing the architecture starts a new deployment that replaces the running tasks. Ensure that the container image you specify supports the architecture you choose. The operating system family for an Express service is always
LINUX.You can't specify
cpuArchitecturetogether withtaskDefinitionArn. -
scalingTargetThe auto-scaling configuration for the Express service.
-
taskDefinitionArnThe Amazon Resource Name (ARN) of a task definition to use to update the Express Gateway service. This allows you to manage your own task definition, giving you more control over the service configuration such as adding sidecar containers.
The task definition must have a container named
Mainwith a single TCP port mapping that includes a container port and port name. The task definition must also haveFARGATEcompatibility.If you provide a task definition ARN, you cannot also specify
primaryContainer,executionRoleArn,taskRoleArn,cpu,memory, orcpuArchitecture.
Value¶
A list with the following syntax:
list(
service = list(
serviceArn = "string",
cluster = "string",
serviceName = "string",
status = list(
statusCode = "ACTIVE"|"DRAINING"|"INACTIVE",
statusReason = "string"
),
targetConfiguration = list(
serviceRevisionArn = "string",
executionRoleArn = "string",
taskRoleArn = "string",
taskDefinitionArn = "string",
cpu = "string",
memory = "string",
cpuArchitecture = "X86_64"|"ARM64",
networkConfiguration = list(
securityGroups = list(
"string"
),
subnets = list(
"string"
)
),
healthCheckPath = "string",
primaryContainer = list(
image = "string",
containerPort = 123,
awsLogsConfiguration = list(
logGroup = "string",
logStreamPrefix = "string"
),
repositoryCredentials = list(
credentialsParameter = "string"
),
command = list(
"string"
),
environment = list(
list(
name = "string",
value = "string"
)
),
secrets = list(
list(
name = "string",
valueFrom = "string"
)
)
),
scalingTarget = list(
minTaskCount = 123,
maxTaskCount = 123,
autoScalingMetric = "AVERAGE_CPU"|"AVERAGE_MEMORY"|"REQUEST_COUNT_PER_TARGET",
autoScalingTargetValue = 123
),
ingressPaths = list(
list(
accessType = "PUBLIC"|"PRIVATE",
endpoint = "string"
)
),
createdAt = as.POSIXct(
"2015-01-01"
)
),
createdAt = as.POSIXct(
"2015-01-01"
),
updatedAt = as.POSIXct(
"2015-01-01"
)
)
)
Request syntax¶
svc$update_express_gateway_service(
serviceArn = "string",
executionRoleArn = "string",
healthCheckPath = "string",
primaryContainer = list(
image = "string",
containerPort = 123,
awsLogsConfiguration = list(
logGroup = "string",
logStreamPrefix = "string"
),
repositoryCredentials = list(
credentialsParameter = "string"
),
command = list(
"string"
),
environment = list(
list(
name = "string",
value = "string"
)
),
secrets = list(
list(
name = "string",
valueFrom = "string"
)
)
),
taskRoleArn = "string",
networkConfiguration = list(
securityGroups = list(
"string"
),
subnets = list(
"string"
)
),
cpu = "string",
memory = "string",
cpuArchitecture = "X86_64"|"ARM64",
scalingTarget = list(
minTaskCount = 123,
maxTaskCount = 123,
autoScalingMetric = "AVERAGE_CPU"|"AVERAGE_MEMORY"|"REQUEST_COUNT_PER_TARGET",
autoScalingTargetValue = 123
),
taskDefinitionArn = "string"
)