Trigger Step Function with API Gateway and use Fargate within Step Function?
0
I want to be able to have a step function that does the following:
- The step function starts with a call to API Gateway from my web app
- The step function starts a Fargate pod based on a specific image
- The step function runs a task on the pod it just created
- After the Fargate task completes, terminate the pod so it does not consume resources
Is this possible to tell Step Functions to start a new pod based on a certain image and then terminate that pod after it returns a success code?
I have not been able to find any info on this.
Thank you
asked 2 months ago14 views
1 Answers
1
Please do respect the time others dedicated helping you by mark answers as accepted.
You can do this by -
- Once the task has been completed, you can query the TaskARN through the metadata service and terminate the task;
- You should also mark the step function step as completed;
- Fargate tasks never "completes" before the "pod".
answered 2 months ago
Relevant questions
Trigger Step Function with API Gateway and use Fargate within Step Function?
asked 2 months agoWhen to invoke a lambda directly or via API Gateway
asked 5 months agoPassing HTTP Headers from API Gateway HTTP API to Step Function?
asked a month agoStep functions pass input into Fargate instance :
asked 3 months agoInternal Server Error from API Gateway when sending queries through gateway to Lambda function connected to RDS database
asked 2 months agoWhy aren't the HTTP headers passed from API Gateway to Step Functions?
asked 5 months agoCan I specify GET URL path parameter in step function?
asked 3 months agoLatency in Step function for express workflow invoked from aws sdk java v2
asked 2 months agoThrottlingException from Step Function triggered through API Endpoint
asked 2 years agoStep Function to Send Email on Error/Success
asked 4 months ago
@Jason_S Thank you for that info.
I understand getting the ARN and terminate the task but is it possible to have Step Functions tell Fargate to spin up a pod based on a specific image to run a task like I mentioned in step 2? I have not been able to find any info on this. All I have been able to find is to send a task to an already running pod.
Thanks