Provide token swap and refresh service on AWS Lambda & API Gateway
- Setup envirnment variables
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_DEFAULT_REGION=ap-northeast-1
export SPOTIFY_CLIENT_ID=
export SPOTIFY_CLIENT_SECRET=
export SPOTIFY_CALLBACK_URL=
export SPOTIFY_ENCRYPTION_SECRET=
NOTE: aws credentials has role for full acesss AWS Lambda
- Deploy lambda functions
node scripts/deploy_lambda.js
- Setup API Gateway
TODO
NOTE: use config/request_templates.txt
as mapping template in order to convert urlencoded data to json data for lambda input