Change the infrastructure document does not affect on AWS

Hello, I am trying to create a flow run using the API in prefect2.0. I am using the following endpoint:

/api/deployments/{id}/create_flow_run

with a body payload:

{
  "parameters": parameters,
  "infrastructure_document_id": new_infrastructure_document_id
}

Then it is working but it is not using the new infrastructure document id it is using the one which I deployed as default.

I am trying to change just the CPU & MEMORY to use in fargate, could you help me?

Thank you in advance.

Hi @Javier_Ebrero - thanks for the question!

Being able to configure CPU and Memory requests on a flow-run by flow-run basis seems useful! This is something we can discuss internally about supporting in a first class manner.

In the meantime, the most direct way to accomplish something like this would probably be to update a given deployment and the patch the infra overrides, much like this example.

While patching the deployment may not be ideal, it should get you what you need (if I’m understanding your use case correctly)

Let us know if you run into trouble!

2 Likes

Thank you for your answering @nate and yes you understood perfectly what I want. I will do like this but would be nice to have this feat like override a flow-run infrastructure settings so I don’t have to modify the default deployment or infrastructure block!