In addition to built-in plugins, Amazon Q can be integrated with various third-party applications. Users can leverage natural language to query information and perform actions seamlessly.
- Download the CloudFormation template onto your local machine.
- Open the AWS Management Console and navigate to AWS CloudFormation.
- Select Create stack with New resources (standard), then Choose an existing template, Upload a template file, click on Choose file and then upload the Cloudformation template you downloaded, and click Next.
- Input a stack name
custom-plugin-restaurant-stack
, Then select Next.
- Scroll down to the bottom, and check "I acknowledge that AWS CloudFormation might create IAM resources.". Then select Next.
- Scroll down to the bottom of the page and click Submit. Wait around 5 minutes until the CloudFormation stack status to be CREATE_COMPLETE.
- Go to Outputs tab and Copy the value of the ApiEndpoint key and save it, as you’ll need it for the custom plugin configuration.
- Navigate to Amazon Q Business.
- Click on the Plugins section under Enhancements, click Add Plugin.
Then select Custom plugin.
- Provide Plugin name
restaurant-booking-plugin
and DescriptionAPI for booking a table in the restaurant
.
- Download the API schema to your local machine.
- Under API schema, select Define with in-line OpenAPI schema editor.
Select YAML as the format.
Copy the API schema content that you previously downloaded and edit the URL value on line 7 with the API Gateway endpoint saved in the previous section (step 7).
- In Authentication section, select No authentication required, and click Add plugin.
- Wait a few minutes. The plugin will be ready to use.
- Open the Q application, you can see Plugins, click it, and select restaurant-booking-plugin.
- Let's book a restaurant table. Using the chat
It's Pup. I want to reserve a table for 5 people, at 8:00pm on the 5th of December 2024.
The system replies with the booking ID, which can be used for other querys/actions.
Next, check the booking detail.
check the detail of booking id {booking_id}, please.
Let's cancel the booking.
I change my mind. Can you cancel f2e62626?
You can also refer to specific times in relation to the present, such as tomorrow or next week.
I want to book for 10 people at 13:00 tomorrow under Doit.