@cubejs-backend/serverless-aws
v0.34.62
Published
Cube.js Serverless AWS support
Downloads
553
Readme
Website • Docs • Blog • Slack • Twitter
Cube.js Serverless AWS
Cube.js Serverless AWS implementation.
Getting Started
Create Cube.js Serverless app:
$ npm install -g serverless
$ cubejs create -d athena -t serverless
Setup Redis
Create AWS ElasticCache Redis instance within the same region where lambda hosts.
Add Redis security group and subnet to serverless.yml
vpc settings:
provider:
vpc:
securityGroupIds:
- sg-12345678901234567 # Your DB and Redis security groups here
subnetIds:
- subnet-12345678901234567 # Your DB and Redis subnets here
Add internet access for Lambda
When you assign vpc to a Lambda functions internet access will be disabled by default. Lambda functions require internet access to send SNS messages for query processing. Please follow this guide to set up internet access for your Lambda functions.
Athena permissions
Please add following permissions to serverless.yml
if you need Athena within your Lambda functions:
provider:
iamRoleStatements:
- Effect: "Allow"
Action:
- "sns:*"
# Athena permissions
- "athena:*"
- "s3:*"
- "glue:*"
Resource:
- "*"
Deploy
$ serverless deploy -v
Logs
$ serverless logs -t -f cubejs
$ serverless logs -t -f cubejsProcess
License
Cube.js Serverless AWS is Apache 2.0 licensed.