https://cerbos.dev logo
#help
Title
# help
h

Hemant Chigadani

10/24/2023, 2:46 PM
Hey Hi All Quick question: Does Cerbos
Hub
supports aws
Lambda
https://github.com/cerbos/cerbos-aws-lambda? Any documentation around it would be helpful, thanks
a

Alex Olivier (Cerbos)

10/24/2023, 3:24 PM
Hey! Indeed it does - just swap out the configuration file to one with your configuration for Cerbos Hub (see https://docs.cerbos.dev/cerbos-hub/getting-started#_connect_a_cerbos_pdp_to_hub)
👍 1
h

Hemant Chigadani

10/24/2023, 4:27 PM
Thanks @Alex Olivier (Cerbos) for the quick reply. I have tried using environment variables to manage hub secret in
sam.yaml
instead of conf.yml I get following error for some reason (Log in debug mode):
Copy code
"error": "failed to create store: failed to determine cache directory: neither $XDG_CACHE_HOME nor $HOME are defined"
a

Alex Olivier (Cerbos)

10/24/2023, 4:34 PM
Sorry about that - let me try and replicate
👍 1
h

Hemant Chigadani

10/24/2023, 4:46 PM
Thank you Alex. CloudWatch is full of following logs for health check errors, was not sure its related, thanks
Copy code
2023/10/24 16:45:15 cerbos health check: Get "<http://127.0.0.1:3592/_cerbos/health>": dial tcp 127.0.0.1:3592: connect: connection refused, pid: 13
a

Alex Olivier (Cerbos)

10/24/2023, 4:47 PM
Thats to be expected as it seems the PDP hasm't started up - I'm spinng up an env atm
h

Hemant Chigadani

10/24/2023, 4:47 PM
Cool
a

Alex Olivier (Cerbos)

10/24/2023, 4:59 PM
Ok got a fix In your SAM - set an environment variable:
XDG_CACHE_HOME: /tmp
🙌 1
Using Hub requires a cache directory but Lambda don't have a HOME defined - setting this env will point it to the
/tmp
dir
h

Hemant Chigadani

10/25/2023, 9:37 AM
Thank you @Alex Olivier (Cerbos) for your valuable inputs. It has worked 👍. But Log still full of health check error message, is there fix for it too?
a

Alex Olivier (Cerbos)

10/25/2023, 10:06 AM
The healthchecks should be passing if the container has started - could you share the execution logs from a cold start?
h

Hemant Chigadani

10/25/2023, 10:15 AM
log-events-viewer-result.csv
a

Alex Olivier (Cerbos)

10/25/2023, 10:35 AM
Ok in this case it seems the healthcheck is a tad aggresive as once it starts up then the healthcheck passes and executions are working as expected. I will look into scaling the logging/retry back a bit, but for now the instance is working as expected and pulling down the latest bundle
1
2 Views