Amazon Bedrock Studio is in preview release and is subject to change.
Create an Amazon Bedrock Studio function component
You can create a function as a component in a Amazon Bedrock Studio project. If you are creating an app, you can can also create a function when you configure the app. For an example, see Add a function call to your chat app.
Warning
The name and description of a function component are visible to all members of the Amazon Bedrock Studio workspace. We recommend that you don't store sensitive data in these two fields. Project-based access control ensures only authorized members of a project can edit the name, description, and other fields in the project.
To create a function component
-
Open your Amazon Bedrock Studio workspace.
-
Make sure that you are in Build mode, by choosing Build at the top right of the page.
-
In the Project dropdown list, choose the project that you want to add a function to.
-
In the Components section, choose Create component and then Function. The Create function pane is shown.
-
For Function name, enter a name for the function in in Function name.
-
For Function description, enter a description for the function.
-
For Function schema, enter the JSON or YAML format OpenAPI schema for the API. Alternatively, upload the JSON or YAML for the file by choosing Import JSON/YAML. You can clear the text box by choosing Reset.
Choose Validate schema to validate the schema.
-
For Authentication method select the authentication method for your API server. By default, Amazon Bedrock Studio preselects the authentication based on information it finds in your OpenAPI schema. For information about authentication methods, see Authentication methods.
-
Enter the information for the authention method that you selected in the previous step.
-
For API servers, enter the URL for your server in Server URL. This value is autopopulated if the server URL is in the schema.
-
Choose Create to create your function.
-
Add your function to a chat app by doing Add a function component to a chat app.