This message was deleted.
# typescript
s
This message was deleted.
g
for anyone else who comes across this, as a workaround i did
aws lambda update-function-configuration --function-name my-function \
--environment "Variables={BUCKET=my-bucket,KEY=file.txt}"
which i found from the docs https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
m
Hi there — in general this should work; I’ve written about this same thing in my book in fact, example here: https://github.com/pulumibook/examples/blob/21040fbe7b4bd2a2038567aa6195c0c41b287ead/chapter4/health-checker/index.ts#L8-L48
The URL (which happens to be a secret) gets read from Pulumi config and passed as an environment variable to the
aws.lambda.CallbackFunction
definition, then picked up at runtime by
process.env
as you have in your example. The main difference I see is that in my example, I’m defining the callback function as its own resource and setting the environment variables on it, then passing that function to the
onSchedule
handler.
g
Thanks @miniature-musician-31262 I will check your example out later today
@miniature-musician-31262 that is exactly what i was after, thanks so much