https://prefect.io logo
#prefect-getting-started
Title
# prefect-getting-started
j

Jaime Raldua Veuthey

02/10/2023, 5:45 PM
Hi, Is it somehow possible to start and stop a container in AWS or GCP from a flow from the Prefect Cloud UI? We want to host Metabase in a container but don't want to have it alive 24/7 and would be nice if the container could be started/stoped somehow from the Prefect UI. Also any alternatives are welcome thanks!
1
👀 1
p

Peyton Runyan

02/10/2023, 6:59 PM
Are y’all using a particular service to run the container?
Something like cloud run on GCP uses an API that allows for deleting services. I imagine AWS is the same. So you could have a flow that takes the unique identifier for your running container as a parameter, makes a request to that endpoint to delete the service and reports back the status. You’d probably need another flow to create the service when you want to run it again.
But long story short, if there is an API route to stop a container for the service you are using, Prefect can absolutely stop a service with a flow
🙌 2
j

Jaime Raldua Veuthey

02/11/2023, 9:52 AM
Thanks @Peyton Runyan! In AWS I am using Fargate. I will check if there is an API route to stop/create containers thanks!