Back
We can set up Environment Variables in aws-lambda for example via AWS SAM:
Environment: Variables: TABLE_NAME: !Ref Table
Environment:
Variables:
TABLE_NAME: !Ref Table
How can I get this variable from current lambda via Node JS AWS-SDK?
Use this:
const tableName = process.env.TABLE_NAME;
Learn how we helped 50,000+ professionals like you !
31k questions
32.8k answers
501 comments
693 users