How to use secrets in bots in awslambda runtime?
# support
a
In VMContext runtime, I can just do something like: const ehrFhirUrl = event.secrets['EHR_FHIR_BASE_URL']?.valueString; However, when I try this in AWS Lambda for my production deployment, it doesn't pick up the secret. Where do I add this?
Just to add on more info, I already configured secrets in my project settings, but despite me trying to access them via event.secrets[], its not working properly I also tried adding the env vars directly to the Lambda function created on AWS by Medplum, but that doesn't work either
Restarting the ECS service worked btw
r
great! Any reason secrets can't work for this? https://www.medplum.com/docs/app/admin-page#secrets
a
I am not sure, I guess it was just a problem with how the secrets were loaded? I forced a new deployment without making any changes to the service and it worked properly then
Maybe secrets needed to be refreshed somehow, not sure
37 Views