Sym's serverless integrations let you use Sym workflows to manage resources that the Sym platform does not directly integrate with. Sym invokes your custom function with the appropriate metadata and then your function implementation updates your backend systems.
For full documentation, check out the AWS Lambda Access Strategy Docs.
Check out our AWS Lambda Strategy Example to see Sym's Lambda Strategy in action!
The schema of Sym's requests to you can be found here, with example payloads in the test
directory.
Each template includes a build.sh
that you can use to package your AWS Lambda function for deployment. Once your function is packaged, you can upload it to S3 or use the update-function-code
API:
$ aws lambda update-function-code \
--function-name ${FUNCTION_NAME} \
--zip-file fileb://handler.zip
You can try the template out by starting with this Terraform snippet or the equivalent in another deployment tool:
resource "aws_lambda_function" "this" {
...
s3_bucket = "sym-releases"
s3_key = "lambda-templates/python.zip"
handler = "handler.handle"
runtime = "python3.9"
...
}
handler.py
lets you run the handler locally using:
$ pip install -r requirements.txt
$ # -e for an escalate payload, -d for a deescalate payload
$ python handler.py [-e | -d]
build.sh
builds a handler.zip
that is appropriate for deploying to an AWS Lambda function.
You can try the template out by starting with this Terraform snippet or the equivalent in another deployment tool:
resource "aws_lambda_function" "this" {
...
s3_bucket = "sym-releases"
s3_key = "lambda-templates/typescript.zip"
handler = "index.handler"
runtime = "nodejs14.x"
...
}
index.ts
lets you run the handler locally using:
$ npm install
$ # -e for an escalate payload, -d for a deescalate payload
$ npx ts-node src/index.ts [-e | -d]
build.sh
builds a handler.zip
that is appropriate for deploying to an AWS Lambda function.
You can try the template out by starting with this Terraform snippet or the equivalent in another deployment tool:
resource "aws_lambda_function" "this" {
...
s3_bucket = "sym-releases"
s3_key = "lambda-templates/go.zip"
handler = "bin/handler"
runtime = "go1.x"
...
}
cmd/local
lets you run the handler locally using:
$ cd cmd/local
$ # -e for an escalate payload, -d for a deescalate payload
$ go run . [-e | -d]
Makefile
builds a handler.zip
that is appropriate for deploying to an AWS Lambda function.
Please reach out with any questions on this example or help getting started.