3

I created an Alexa skill (hosted by Amazon) and would like to call my external API which requires an access token.

Where do I store this token?

I know that one can add environment variables to lambdas, but I could not find the skill lambda in my AWS account.

Kristof Komlossy
  • 623
  • 2
  • 7
  • 19

1 Answers1

0

If you're using "Alexa Hosted," Alexa is hosting the Lambda and an S3 bucket for you as an IAM user on an account owned by Alexa. The Lambda is the "Code" tab in the developer console for your skill. In the lower right corner of that tab you'll find links to access the S3 and CloudWatch consoles for the AWS IAM identity attached to that skill.

You cannot access the Lambda console directly because the permissions for that IAM user are pretty tightly locked down.

Your best bet is to keep it in a .env file and use the dotenv node module.

LetMyPeopleCode
  • 1,895
  • 15
  • 20
  • thank you for your answer, but where would I put this .env file? It tried to put it into the root directory and to the /lambda/ directory, none of these worked – Kristof Komlossy Nov 10 '20 at 18:55
  • Follow the directions for using dotenv, make sure you add it to your package.json. https://www.npmjs.com/package/dotenv – LetMyPeopleCode Nov 13 '20 at 15:55