Deploying flow through python code

Hi,

Need to deploy the flow through lambda function. Kindly suggest the process to deploy this.

Hi @Dharshini_Thilagar

Here are the API calls needed to deploy an Architect flow:

  • POST /api/v2/flows/jobs - Registers a new job and returns a presigned URL to which an Architect flow YAML file can be PUT which will then initiate the job.

  • PUT {presigned url} - Execute a PUT request to the URL returned from the previous call, with the file contents of the Architect flow config file as a string for the request body.

To achieve this with the Python SDK, you will need to find the SDK functions that correspond to these API calls.

It looks like this will be post_flows_jobs

2 Likes

Hi Dharshini,

This endpoint is also the endpoint the CX as Code flow resources uses to deploy flows. Be aware that there is a couple of limitations with this endpoint:

  1. First, you can not deploy groups of flows with this endpoint. This endpoint only lets you deploy a single endpoint at a time.
  2. Second the endpoint just takes the flow. It does not allow you to do things like variable substitution in the flow.
  3. The endpoint will only let you deploy a flow that can be deployed in 15 minutes or less. (This is a limitation with the AWS lambda we use).

If you need to do any of the above items, I would recommend you would look at Archy our CLI for deploying flows.

Can I ask why you guys are using Python to deploy your flows rather then something like CX as Code or Archy?

Thanks,
John Carnell
Manager, Developer Engagement

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.