<?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: Instance Profile creation via the Databricks REST API returns &amp;quot;INVALID_PARAMETER_VALUE&amp;quot; in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10443#M5618</link>
    <description>&lt;P&gt;Hi, Is this a constant error or intermittent? For newly added profiles AWS has a buffer time and sometimes it is intermittent. Also, could you please provide the full error here along with the screenshot? (Also, you can refer: &lt;A href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html" alt="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html" target="_blank"&gt;https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html&lt;/A&gt;)&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 07:10:26 GMT</pubDate>
    <dc:creator>Debayan</dc:creator>
    <dc:date>2023-02-02T07:10:26Z</dc:date>
    <item>
      <title>Instance Profile creation via the Databricks REST API returns "INVALID_PARAMETER_VALUE"</title>
      <link>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10442#M5617</link>
      <description>&lt;P&gt;# &lt;B&gt;Problem Statement&lt;/B&gt;&lt;/P&gt;&lt;P&gt;We have a need to create Instance Profiles via the Databricks REST API, but the endpoint returns an "INVALID_PARAMETER_VALUE" error with "Syntactically invalid AWS instance profile ARN" message even when provided an appropriate ARN as input.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;# &lt;B&gt;What's been done&lt;/B&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Creating Role and Instance Profile on Databricks AWS account via AWS CLI&lt;/LI&gt;&lt;LI&gt;Calling /instance-profiles/add to register Instance Profile in Databricks&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&lt;B&gt; Code&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;def create_instance_profile(instance_profile_arn, skip_validation = False):
    api_command = '/instance-profiles/add'
    api_version = f'/api/2.0'
    url = f"https://{DATABRICKS_HOST}{api_version}{api_command}"
&amp;nbsp;
    params = {
      "instance_profile_arn" : instance_profile_arn,
      "skip_validation" : skip_validation,
      "is_meta_instance_profile" : False
    }
&amp;nbsp;
    header = {
        "accept": "application/scim+json",
        "Authorization": f"Bearer {DATABRICKS_TOKEN}"
    }
&amp;nbsp;
    response = requests.post(url, params = params, headers=header)
&amp;nbsp;
    print(json.dumps(json.loads(response.text), indent = 2))
&amp;nbsp;
arn = "arn:aws:iam::&amp;lt;account_id&amp;gt;:instance-profile/my-instance-profile-name"
create_instance_profile(arn)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 10:46:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10442#M5617</guid>
      <dc:creator>lasmali</dc:creator>
      <dc:date>2023-01-31T10:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Instance Profile creation via the Databricks REST API returns "INVALID_PARAMETER_VALUE"</title>
      <link>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10444#M5619</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, I havn't been able to make a successful request via the API (although I'm able to list the instance profiles on our Databricks account via the API), but I can add the instance profile via the Databricks UI without problem. &lt;/P&gt;&lt;P&gt;Here's the response from the Databricks API.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="error-message"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/744iC6107DC5DE8C597B/image-size/large?v=v2&amp;amp;px=999" role="button" title="error-message" alt="error-message" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 08:38:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10444#M5619</guid>
      <dc:creator>lasmali</dc:creator>
      <dc:date>2023-02-02T08:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Instance Profile creation via the Databricks REST API returns "INVALID_PARAMETER_VALUE"</title>
      <link>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10445#M5620</link>
      <description>&lt;P&gt;Hi @lasse Lidegaard​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 05:53:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10445#M5620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-08T05:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Instance Profile creation via the Databricks REST API returns "INVALID_PARAMETER_VALUE"</title>
      <link>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10443#M5618</link>
      <description>&lt;P&gt;Hi, Is this a constant error or intermittent? For newly added profiles AWS has a buffer time and sometimes it is intermittent. Also, could you please provide the full error here along with the screenshot? (Also, you can refer: &lt;A href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html" alt="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html" target="_blank"&gt;https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 07:10:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/instance-profile-creation-via-the-databricks-rest-api-returns/m-p/10443#M5618</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-02-02T07:10:26Z</dc:date>
    </item>
  </channel>
</rss>

