1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Container overrides need to go into the Parameters
attributes of your Action in your state machine. Here is an example that will retrieve the "foo"
attribute from the input and set it as an environment variable:
{
"States":{
...,
"Manage ECS task":{
"Type":"Task",
"Resource":"arn:aws:states:::ecs:runTask.waitForTaskToken",
"Parameters":{
"LaunchType":"FARGATE",
"Cluster":"cluster-arn",
"TaskDefinition":"job-id",
"Overrides":{
"ContainerOverrides":[
{
"Name":"container-name",
"Environment":[
{
"Name":"FOO_FROM_INPUT",
"Value.$":"$.foo"
}
]
}
]
}
}
}
}
}
If your input supplies the entire value of the "ContainerOverrides"
configuration, then you can do something like this:
{
"States":{
...,
"Manage ECS task":{
"Type":"Task",
"Resource":"arn:aws:states:::ecs:runTask.waitForTaskToken",
"Parameters":{
"LaunchType":"FARGATE",
"Cluster":"cluster-arn",
"TaskDefinition":"job-id",
"Overrides":{
"ContainerOverrides.$": "$.containerOverrides"
}
}
}
}
}
See also Pass State Input as Parameters Using Paths in the Step Functions documentation.
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 ans
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 4 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 5 ans