https://cerbos.dev logo
Title
v

Vignesh Sankaran

01/24/2023, 8:28 AM
We are trying to setup cerbos in Lambda. We were able to set that up but unable to find documentation on how to invoke the APIs. If we try the normal way, <API-gateway-IP-endpoint>:3592/ it is failing to start Cerbos as per the cloudwatch logs. Any assistance or support on this would be really helpful.
a

Alex Olivier (Cerbos)

01/24/2023, 8:38 AM
Hey what is the error you are getting?
v

Vignesh Sankaran

01/24/2023, 8:42 AM
Hi Alex, Thanks for the quick support. Yes, I am using the above repo only.
Will share the error log here
d

Dennis (Cerbos)

01/24/2023, 8:43 AM
There’s no need to specify a port number. Please use
<API-gateway-IP-endpoint>
v

Vignesh Sankaran

01/24/2023, 8:46 AM
log-events-viewer-result.csv
a

Alex Olivier (Cerbos)

01/24/2023, 8:48 AM
" 1674549904291,"cerbos: error: failed to create store: failed to read blob configuration: workDir unspecified and failed to determine user cache dir: neither $XDG_CACHE_HOME nor $HOME are defined This is the issue - the instance is never starting.
v

Vignesh Sankaran

01/24/2023, 8:50 AM
I will re-check the config set by our platform team and re-try deploying the service. Will reach out if I fail again.
I assumed that the above error was due to S3 permissions of sort.
In sam.yml I have set the stack name to a different string however while make publish-lambda it is picking up the default stack name ‘Cerbos’ itself.
I deleted the default Stack to redeploy everything clean but blocked here.
For now I manually changed the stack name to new name in sam.yml and retrying the same.
a

Alex Olivier (Cerbos)

01/24/2023, 1:29 PM
Did it work this time?
v

Vignesh Sankaran

01/24/2023, 1:53 PM
Yes it did get deployed successfully.
But when I try to invoke the Cerbos endpoint. It is returning internal server error.
log-events-viewer-result-2.csv
a

Alex Olivier (Cerbos)

01/24/2023, 1:55 PM
1674568349340,"cerbos: error: failed to create store: failed to read blob configuration: workDir unspecified and failed to determine user cache dir: neither $XDG_CACHE_HOME nor $HOME are defined
Something still isn’t right with the workDir so it isn’t starting up - what did you change earlier?