<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issues making requests to Databricks from AWS Lambda in Databricks Free Edition Help</title>
    <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176450#M1030</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/271633"&gt;@Sunioj&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Both of your errors are caused by &lt;/SPAN&gt;&lt;STRONG&gt;Databricks Free Edition compute limits&lt;/STRONG&gt;&lt;SPAN&gt; and how &lt;/SPAN&gt;databricks-sql-connector&lt;SPAN&gt; handles warehouse startups:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Error 1 (BAD_REQUEST: Cannot create the resource):&lt;/STRONG&gt;&lt;SPAN&gt; Free Edition accounts only get one &lt;/SPAN&gt;2X-Small&lt;SPAN&gt; Serverless SQL Warehouse with a strict daily compute quota (and no capacity SLA).&lt;/SPAN&gt;&lt;SPAN&gt; Because your AWS Lambda runs on a schedule,&lt;/SPAN&gt;&lt;SPAN&gt; repeatedly waking or running the warehouse exhausts your daily free compute limit.&lt;/SPAN&gt;&lt;SPAN&gt; Once that quota is reached (or when the shared free-tier pool is busy),&lt;/SPAN&gt;&lt;SPAN&gt; Databricks blocks the warehouse from starting for the rest of the day—which is why retries also fail.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Why it works locally:&lt;/STRONG&gt;&lt;SPAN&gt; When you test locally,&lt;/SPAN&gt;&lt;SPAN&gt; you are usually running while you still have daily quota left or while the warehouse is already &lt;/SPAN&gt;RUNNING&lt;SPAN&gt; in your browser.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Error 2 (400 Bad Request on /start):&lt;/STRONG&gt;&lt;SPAN&gt; First,&lt;/SPAN&gt;&lt;SPAN&gt; you don't need this API call—&lt;/SPAN&gt;sql.connect()&lt;SPAN&gt; automatically wakes up a stopped SQL Warehouse.&lt;/SPAN&gt;&lt;SPAN&gt; Second,&lt;/SPAN&gt; response.raise_for_status()&lt;SPAN&gt; hides the real Databricks error message.&lt;/SPAN&gt;&lt;SPAN&gt; Calling &lt;/SPAN&gt;/start&lt;SPAN&gt; returns a &lt;/SPAN&gt;400&lt;SPAN&gt; either because your daily Free Edition quota is exhausted (you can verify this by printing &lt;/SPAN&gt;response.text&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt; or because &lt;/SPAN&gt;databricks_host&lt;SPAN&gt; is missing &lt;/SPAN&gt;https://&lt;SPAN&gt; (&lt;/SPAN&gt;sql.connect&lt;SPAN&gt; expects a bare hostname,&lt;/SPAN&gt;&lt;SPAN&gt; while &lt;/SPAN&gt;requests.post&lt;SPAN&gt; requires &lt;/SPAN&gt;https://&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;How to fix it:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Remove the /start API call:&lt;/STRONG&gt;&lt;SPAN&gt; Let &lt;/SPAN&gt;sql.connect()&lt;SPAN&gt; start the warehouse automatically,&lt;/SPAN&gt;&lt;SPAN&gt; set your Lambda timeout to at least &lt;/SPAN&gt;&lt;STRONG&gt;60–120 seconds&lt;/STRONG&gt;&lt;SPAN&gt; for cold starts,&lt;/SPAN&gt;&lt;SPAN&gt; and use a &lt;/SPAN&gt;with sql.connect(...) as conn:&lt;SPAN&gt; block so connections close properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Reduce your schedule frequency:&lt;/STRONG&gt;&lt;SPAN&gt; Set your SQL Warehouse &lt;/SPAN&gt;&lt;STRONG&gt;Auto Stop&lt;/STRONG&gt;&lt;SPAN&gt; to the minimum (5–10 minutes) in the UI and run your Lambda less frequently (e.&lt;/SPAN&gt;&lt;SPAN&gt;g.,&lt;/SPAN&gt;&lt;SPAN&gt; hourly or once a day) so you don't burn through your daily Free Edition quota.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Pull from S3 instead of pushing from Lambda:&lt;/STRONG&gt;&lt;SPAN&gt; Instead of waking up the warehouse from Lambda for small inserts,&lt;/SPAN&gt;&lt;SPAN&gt; consider using a scheduled Databricks Job with &lt;/SPAN&gt;&lt;STRONG&gt;Auto Loader&lt;/STRONG&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;COPY INTO&lt;SPAN&gt; to pull new files directly from S3 in batches—it uses a fraction of the compute time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Sun, 15 Nov 2026 20:47:11 GMT</pubDate>
    <dc:creator>ShamenParis</dc:creator>
    <dc:date>2026-11-15T20:47:11Z</dc:date>
    <item>
      <title>Issues making requests to Databricks from AWS Lambda</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176350#M1028</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am getting acquainted with Databricks, of which I have signed up for a free account.&amp;nbsp;&lt;BR /&gt;I have a Lambda function using Python 3.14 and the databricks-sql-connector library that runs on a schedule, to take data from a file in S3 and put the differential data into a workspace in Databricks. There are two errors that I am having:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1.&amp;nbsp; RequestError: &lt;SPAN class=""&gt;Error&lt;/SPAN&gt; during request to server: BAD_REQUEST: Cannot create the resource, please try again later.&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;Here is a snippet:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from databricks import sql

conn = sql.connect(server_hostname=databricks_host,
                    http_path="/sql/1.0/warehouses/%s" % warehouse,
                    access_token=databricks_token,
            ) &lt;/LI-CODE&gt;&lt;P&gt;This code works fine locally, but in AWS lambda seems to fail randomly without much explanation. I tried to consult with Genie, other LLMs, Google, etc. to figure out the issue. Genie recommended that I implement a retry loop, but I am not sure if that makes sense since subsequent invocations of the code also had the same error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Instead, I implemented that Lambda makes a &lt;A href="https://docs.databricks.com/api/warehouses/v1/start-warehouse" target="_self"&gt;REST API call to Databricks&lt;/A&gt; before the "connection" takes place. It seemed to work for a bit, then I started getting the next error:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2.&amp;nbsp;requests.&lt;SPAN class=""&gt;exceptions&lt;/SPAN&gt;.HTTPError: 400 Client &lt;SPAN class=""&gt;Error&lt;/SPAN&gt;: Bad Request for url:&lt;BR /&gt;&lt;/STRONG&gt;Snippet:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;response = requests.post(
            "%s/api/2.0/sql/warehouses/%s/start" % (databricks_host,warehouse),
            headers={
                "Authorization": "Bearer %s" % databricks_token
            }
        )
        
response.raise_for_status()&lt;/LI-CODE&gt;&lt;P&gt;AWS logs shows the URL which the request failed with, and that URL when consulting with Genie also seems fine. This code also works just fine locally as well.&lt;BR /&gt;&lt;BR /&gt;I tried to search within this forum to see similar issues, but did not find any. If anyone could help it would be appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2026 13:36:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176350#M1028</guid>
      <dc:creator>Sunioj</dc:creator>
      <dc:date>2026-11-13T13:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issues making requests to Databricks from AWS Lambda</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176424#M1029</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/271633"&gt;@Sunioj&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Both errors most likely mean that the SQL warehouse could not start at that moment, so the first step is to read the real error text. requests.raise_for_status() hides the response body, so log response.status_code and response.text before you raise; the JSON body has an error_code and a message that say why the start was refused. Free Edition has fixed limits that matter here: one SQL warehouse, limited to 2X-Small, and a fair usage quota. The Free Edition limitations page says that if you exceed your quota, "your workspace's compute resources will be shut down and unavailable for the rest of the day". A scheduled Lambda that wakes the warehouse many times a day can reach that limit, and then both the connect and the start call fail until the quota resets. That can look random, and it can also explain why a test from your laptop at another time works. To check, open SQL Warehouses in the workspace when the Lambda fails, look at the warehouse state, and note the time of day of the failures. A retry with a growing wait (for example 30 seconds, 2 minutes, 5 minutes) is fine for a short start-up problem, but it will not help when the quota is used up, so run the Lambda less often or load more data per run. Also note that Free Edition has no SLA or support, so a paid workspace is the safer place for a production schedule.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Docs: &lt;A href="https://docs.databricks.com/aws/en/getting-started/free-edition-limitations" target="_blank"&gt;https://docs.databricks.com/aws/en/getting-started/free-edition-limitations&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2026 04:24:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176424#M1029</guid>
      <dc:creator>Yougasundar</dc:creator>
      <dc:date>2026-11-15T04:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issues making requests to Databricks from AWS Lambda</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176450#M1030</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/271633"&gt;@Sunioj&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Both of your errors are caused by &lt;/SPAN&gt;&lt;STRONG&gt;Databricks Free Edition compute limits&lt;/STRONG&gt;&lt;SPAN&gt; and how &lt;/SPAN&gt;databricks-sql-connector&lt;SPAN&gt; handles warehouse startups:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Error 1 (BAD_REQUEST: Cannot create the resource):&lt;/STRONG&gt;&lt;SPAN&gt; Free Edition accounts only get one &lt;/SPAN&gt;2X-Small&lt;SPAN&gt; Serverless SQL Warehouse with a strict daily compute quota (and no capacity SLA).&lt;/SPAN&gt;&lt;SPAN&gt; Because your AWS Lambda runs on a schedule,&lt;/SPAN&gt;&lt;SPAN&gt; repeatedly waking or running the warehouse exhausts your daily free compute limit.&lt;/SPAN&gt;&lt;SPAN&gt; Once that quota is reached (or when the shared free-tier pool is busy),&lt;/SPAN&gt;&lt;SPAN&gt; Databricks blocks the warehouse from starting for the rest of the day—which is why retries also fail.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Why it works locally:&lt;/STRONG&gt;&lt;SPAN&gt; When you test locally,&lt;/SPAN&gt;&lt;SPAN&gt; you are usually running while you still have daily quota left or while the warehouse is already &lt;/SPAN&gt;RUNNING&lt;SPAN&gt; in your browser.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Error 2 (400 Bad Request on /start):&lt;/STRONG&gt;&lt;SPAN&gt; First,&lt;/SPAN&gt;&lt;SPAN&gt; you don't need this API call—&lt;/SPAN&gt;sql.connect()&lt;SPAN&gt; automatically wakes up a stopped SQL Warehouse.&lt;/SPAN&gt;&lt;SPAN&gt; Second,&lt;/SPAN&gt; response.raise_for_status()&lt;SPAN&gt; hides the real Databricks error message.&lt;/SPAN&gt;&lt;SPAN&gt; Calling &lt;/SPAN&gt;/start&lt;SPAN&gt; returns a &lt;/SPAN&gt;400&lt;SPAN&gt; either because your daily Free Edition quota is exhausted (you can verify this by printing &lt;/SPAN&gt;response.text&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt; or because &lt;/SPAN&gt;databricks_host&lt;SPAN&gt; is missing &lt;/SPAN&gt;https://&lt;SPAN&gt; (&lt;/SPAN&gt;sql.connect&lt;SPAN&gt; expects a bare hostname,&lt;/SPAN&gt;&lt;SPAN&gt; while &lt;/SPAN&gt;requests.post&lt;SPAN&gt; requires &lt;/SPAN&gt;https://&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;How to fix it:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Remove the /start API call:&lt;/STRONG&gt;&lt;SPAN&gt; Let &lt;/SPAN&gt;sql.connect()&lt;SPAN&gt; start the warehouse automatically,&lt;/SPAN&gt;&lt;SPAN&gt; set your Lambda timeout to at least &lt;/SPAN&gt;&lt;STRONG&gt;60–120 seconds&lt;/STRONG&gt;&lt;SPAN&gt; for cold starts,&lt;/SPAN&gt;&lt;SPAN&gt; and use a &lt;/SPAN&gt;with sql.connect(...) as conn:&lt;SPAN&gt; block so connections close properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Reduce your schedule frequency:&lt;/STRONG&gt;&lt;SPAN&gt; Set your SQL Warehouse &lt;/SPAN&gt;&lt;STRONG&gt;Auto Stop&lt;/STRONG&gt;&lt;SPAN&gt; to the minimum (5–10 minutes) in the UI and run your Lambda less frequently (e.&lt;/SPAN&gt;&lt;SPAN&gt;g.,&lt;/SPAN&gt;&lt;SPAN&gt; hourly or once a day) so you don't burn through your daily Free Edition quota.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Pull from S3 instead of pushing from Lambda:&lt;/STRONG&gt;&lt;SPAN&gt; Instead of waking up the warehouse from Lambda for small inserts,&lt;/SPAN&gt;&lt;SPAN&gt; consider using a scheduled Databricks Job with &lt;/SPAN&gt;&lt;STRONG&gt;Auto Loader&lt;/STRONG&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;COPY INTO&lt;SPAN&gt; to pull new files directly from S3 in batches—it uses a fraction of the compute time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 15 Nov 2026 20:47:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/176450#M1030</guid>
      <dc:creator>ShamenParis</dc:creator>
      <dc:date>2026-11-15T20:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issues making requests to Databricks from AWS Lambda</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/177118#M1043</link>
      <description>&lt;DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Short version:&lt;/STRONG&gt; both errors look like the same problem, the SQL warehouse being in a state where it can't accept the request (starting, stopping, or unavailable), and &lt;CODE&gt;raise_for_status()&lt;/CODE&gt; is hiding the real message. A retry alone won't fix it. You need to check the warehouse state and wait for it to be &lt;CODE&gt;RUNNING&lt;/CODE&gt; before you connect.&lt;/P&gt;
&lt;H2&gt;What's likely happening&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;CODE&gt;BAD_REQUEST: Cannot create the resource, please try again later&lt;/CODE&gt;&lt;/STRONG&gt; is typically what the connector surfaces when it opens a session against a warehouse that is stopped, mid-start, or mid-stop. It works locally mostly because of timing: your local runs probably hit an already-running warehouse. Free Edition warehouses auto-stop quickly, so a scheduled Lambda will often hit a cold one.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;The 400 on &lt;CODE&gt;/start&lt;/CODE&gt;&lt;/STRONG&gt; is most likely the same race. Calling start on a warehouse that is already &lt;CODE&gt;STARTING&lt;/CODE&gt; or &lt;CODE&gt;RUNNING&lt;/CODE&gt;, or one that is &lt;CODE&gt;STOPPING&lt;/CODE&gt;, can be rejected. Because &lt;CODE&gt;raise_for_status()&lt;/CODE&gt; throws away the response body, you only see "Bad Request". The JSON body has the actual reason.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Free Edition limits can cause persistent failures.&lt;/STRONG&gt; It has a small compute allotment, a single small warehouse, and daily usage quotas. If the quota is exhausted, or the warehouse is being shut down or recycled, every invocation fails for a while. That would explain why subsequent invocations had the same error and why a retry loop with a 1–2 second delay didn't help. Check the warehouse and usage state in the workspace UI when it fails.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Step 1: Stop swallowing the error&lt;/H2&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;r = requests.post(url, headers=headers, timeout=30)
if not r.ok:
    print(r.status_code, r.text)   # this is the real error message
    r.raise_for_status()
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Post that body here if it still doesn't make sense. It will say whether it's a state conflict, a quota issue, or a permissions issue.&lt;/P&gt;
&lt;H2&gt;Step 2: Check state, start only if stopped, then wait&lt;/H2&gt;
&lt;P&gt;Don't blindly POST &lt;CODE&gt;/start&lt;/CODE&gt;. Read the state first and poll until it's &lt;CODE&gt;RUNNING&lt;/CODE&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;import time, requests

def ensure_warehouse_running(host, warehouse_id, token, timeout_s=300):
    base = f"https://{host}/api/2.0/sql/warehouses/{warehouse_id}"
    h = {"Authorization": f"Bearer {token}"}
    deadline = time.time() + timeout_s

    while time.time() &amp;lt; deadline:
        r = requests.get(base, headers=h, timeout=30)
        if not r.ok:
            raise RuntimeError(f"GET warehouse failed: {r.status_code} {r.text}")
        state = r.json()["state"]   # STARTING, RUNNING, STOPPING, STOPPED, ...

        if state == "RUNNING":
            return
        if state == "STOPPED":
            s = requests.post(f"{base}/start", headers=h, timeout=30)
            if not s.ok:
                print("start failed:", s.status_code, s.text)
        # STARTING / STOPPING: just wait
        time.sleep(5)

    raise TimeoutError("Warehouse did not reach RUNNING in time")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then call &lt;CODE&gt;sql.connect(...)&lt;/CODE&gt;. A retry with backoff does make sense here, but only around a state-aware check like this, not around a blind reconnect.&lt;/P&gt;
&lt;H2&gt;Step 3: Lambda-specific things to check&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Lambda timeout:&lt;/STRONG&gt; a cold warehouse can take a minute or more to start. Set the function timeout well above that. The default 3 seconds will fail in confusing ways.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Hostname format:&lt;/STRONG&gt; &lt;CODE&gt;sql.connect(server_hostname=...)&lt;/CODE&gt; wants the bare hostname with no &lt;CODE&gt;https://&lt;/CODE&gt;. The REST calls need the full &lt;CODE&gt;https://&lt;/CODE&gt; URL. If you're reusing one variable for both, one of them is wrong.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Python 3.14:&lt;/STRONG&gt; the connector pulls in compiled dependencies such as &lt;CODE&gt;pyarrow&lt;/CODE&gt;, so make sure they're packaged for Lambda's architecture (x86_64 vs arm64) and your Python version. If the import works but behavior is odd, try a 3.12 or 3.13 runtime to rule it out.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Overlapping invocations:&lt;/STRONG&gt; if the schedule fires while the previous run is still waiting on the warehouse, you can get concurrent start and connect attempts against a tiny warehouse. Set reserved concurrency to 1.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Step 4: Credentials&lt;/H2&gt;
&lt;P&gt;A bad or expired PAT would normally give you a 401/403, not a 400, so I don't think that's your issue. Still, for an unattended job the better long-term pattern is OAuth machine-to-machine with a service principal instead of a long-lived personal token [1]. Store the credentials in AWS Secrets Manager, not in plain Lambda environment variables.&lt;/P&gt;
&lt;P&gt;If the response body from Step 1 mentions quota, limits, or "resource" availability, that's a Free Edition capacity issue. In that case, schedule the job less frequently or at a different time of day, and batch the work into fewer connections.&lt;/P&gt;
&lt;H2&gt;References&lt;/H2&gt;
&lt;P&gt;[1] Authorize access to Databricks resources | Databricks on AWS — &lt;A href="https://docs.databricks.com/aws/en/dev-tools/auth" target="_blank"&gt;https://docs.databricks.com/aws/en/dev-tools/auth&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Nov 2026 16:49:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-making-requests-to-databricks-from-aws-lambda/m-p/177118#M1043</guid>
      <dc:creator>anuj_lathi</dc:creator>
      <dc:date>2026-11-20T16:49:25Z</dc:date>
    </item>
  </channel>
</rss>

