To register for a callback from BioT, you (the developer) must supply BioT with a callback endpoint URL. The URL can be of an API that resides anywhere in the world and does not have to be hosted in AWS cloud.
To make sure the plugin responds quickly to BioT calls, it is recommended that the implementation is in the same AWS availability zone as the one that holds your AWS account.
If you decide to deploy your code under your own account, then there will be no restrictions on the way the callback should be implemented.
The only requirements are that the exposed URL is HTTPS and public plus that there are no security measures that will block BioT from reaching this endpoint URL.
Securing the communication between BioT and the function code will be done by utilizing JWT. BioT will send a signed token that will have to be verified by the function before executing its custom code.
Deploying under the same account that hosts the BioT platform has several benefits:
- Almost no latency between BioT and the implementation.
- You will not have to use two cloud accounts to manage your cloud solution.
- All security configuration will be handled by BioT.
The following restrictions apply when deploying under the BioT account:
- The solution must be compatible and based upon the AWS Lambda solution.
- The plugin will only have network access and will not be able to access other AWS services like RDS, S3, etc.
Upon request, you will receive AWS credentials that will allow you to:
- Login to BioT AWS account
- Have programmatic access to the AWS account using AWS CLI. Access to AWS will be restricted to the AWS Lambda service.
- Inside your AWS account, navigate to the lambda service.
- Click Create Function.
- In the Create Function page that appears, select Author from scratch, enter the Function Name and under Runtime choose the function engine, e.g., Node.js 16.x
- Under Advanced Settings, select the Enable function URL checkbox and set Auth Type to None then click Create Function.
- Once the Lambda is created, the public Function URL will be available. Deploy the Lambda from a zip file or paste the code directly in the Code Source editor.
The Lambda can also be deployed directly from the command line.
Please refer to the [AWS documentation]https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html) for further instructions.
Large Size Lambda Functions
If the Lambda code is larger than 3 MB, or the zip file is larger than 50 MB, as stated in the Getting Started document, you may need to deploy the Lambda as a docker image.
Please contact BioT customer support to help you deploy your function as a docker image.
- If your plugin lambda function make API calls or is located outside the cloud account, consider increasing the lambda timeout. The default timeout is 3 seconds and might not be enough time for the lambda to fully execute.
To increase the timeout, click on the configuration tab and then the edit button in the top right corner.
In the edit screen, you may increase the lambda timeout.
The edit screen can also be used to increase the max memory and storage used by the lambda.
Changing these values might speed up your lambda processing, but increase its pricing.
Consult the AWS lambda pricing calculator to optimize your lambda configuration.
Updated 4 months ago