The Benchling Packager automatically creates a dedicated Quilt package for every Benchling notebook, to help ensure all your experiment data is:
- Findable
- Linkable
- Accessible
- Interoperable
- Reusable
within your AWS private cloud.
Benchling Packager is an example CloudFormation template for Benchling-Quilt integration. The template creates an AWS Lambda function that is triggered by Benchling EventBridge events.
The lambda will create or update a Quilt packages on the following Benchling EventBridge events:
v2.entry.created
v2.entry.updated.fields
If the notebook has an appropriate schema, the lambda will also back-update the Benchling notebook entry with the following fields:
Quilt+ URI
Quilt Revise URL
Quilt Catalog URL
You will need access to both the AWS Console and Benchling Admin Console to complete the configuration. You will also need:
- Your Benchling tenant domain (e.g.,
<YOUR_TENANT>
from<YOUR_TENANT>.benchling.com
) - Your AWS Account ID (e.g. 12345689123)
- The AWS Region (e.g., us-west-2) you want to process events in
- An Event Bus Name (e.g., quilt-integration)
From your Benchling tenant, use that event bus name and your AWS account ID to subscribe to Benchling events
-
Go to
https://<YOUR_TENANT>.benchling.com/event-subscriptions
, or go navigate to the settings menu > Feature settings > Developer Console, which takes you to the Events page -
Click the “+” button, which should open the following modal:
-
Fill in the:
- AWS Account ID
- AWS Region
- Event Bus Name
- Event Types:
v2.entry.created
andv2.entry.updated.fields
-
Click “Create"
This will also create a Partner Event Source in your AWS account.
As soon as you create a new event subscription in Benchling, you should immediately create a corresponding event bus in AWS. Otherwise, the source may be automatically deleted, which would require a support ticket to restore.
- Go to the Partner Event Sources for your region.
- Click the name of the Partner Event Source created in the previous step,
e.g.
aws.partner/benchling.com/<YOUR_TENANT>/quilt-integration
- Click
Associate with event bus
- Click
Associate
.
This will create a new event bus in your AWS account with the exact same name as the Partner Event Source. You will need this name when you create the CloudFormation stack.
Don't worry about creating an "Events Rule" in AWS. That will be handled via CloudFormation.
It is best to run each stack using its own credentials.
You get these credentials by creating a Benchling app and giving it access to your tenant:
- In the Benchling Developer Console, click "Apps" (in the left sidebar, right above "Events)
- Click
Create app
->From scratch
- Enter the App Name (and optional Description)
- Select "Manual" for Lifecycle Management
- Click
Create
This takes you to the app settings page.
- Click
Generate secret
to create theClient Secret
value. - Use the "copy" icon on the right to copy the
Client ID
andClient Secret
values for use later.
NOTE: You do NOT need to explicitly add the app to your tenant, since it was already created there.
Admins can add apps in the organization page in the “APPS” tab:
- Profile -> Tenant Admin Console -> Organizations
- Select the organization you want to add the app to
- Click “Apps” tab
- Type the name of your app in "Search for an app"
- Click “Add App”
- Select the app you want to add
- Download CloudFormation template here
- Go to the CloudFormation service.
- Select the region used in step 1.
- Click
Create stack
->With new resources (standard)
- Under
Specify template
selectUpload a template file
- Click
Choose file
and selectbenchling_packager.yaml
which you downloaded earlier. - Click
Next
and enter a stack name, e.g.benchling-packager
- Under
Parameters
:- Enter the name of the event bus created at step 1 as
BenchlingEventBusName
. - Enter the client ID from settings of app created at step 2 as
BenchlingClientId
. - Enter the your Benchling tenant name (i.e. $BenchlingTenant in https://$BenchlingTenant.benchling.com) as
BenchlingTenant
. - Enter the name of the S3 bucket to use for storing packages as
DestinationBucket
. - Optional: change the
PackageNamePrefix
used when creating new packages (default:benchling/
). - Specify the hostname of your Quilt Catalog as
QuiltWebHost
- Enter the name of the event bus created at step 1 as
- Click
Next
, then clickNext
again - Check
I acknowledge that AWS CloudFormation might create IAM resources.
- Click
Submit
- Under
Resources
tab of CloudFormation stack findBenchlingClientSecret
and click on its Physical ID. - Click
Retrieve secret value
- Click
Set secret value
(or "Edit" if it is already set) - Enter as "Plaintext" the Client Secret ("cs_XXX") from the app generated at step 2
In order for the lambda to update Benchling with the package information, the notebook must have a schema containing exactly the following fields:
Name | Required | Multi-select | Definition |
---|---|---|---|
Quilt+ URI | Text | ||
Quilt Revise URL | Text | ||
Quilt Catalog URL | Text | ||
Sentinel | Integer |
You can either create a brand-new schema, or add these fields to an existing schema. Each new notebook will need to have this schema applied to it. You can either do this manually, or by adding the schema to a template.
See Benchling docs for more information.
Create new Benchling entry with schema created at the step 5, or set this schema for existing entry.
Within minutes the package will be created and the entry fields will be updated with links to this package.
To refresh Quilt package from entry again you have to update
Sentinel
field with a different value.