imageGetter API with AWS Lambda
imageGetter API with AWS Lambda
$ yarn global add serverless
AWS IAM을 이용한 인증으로 두 가지 방법 중 하나를 실행하면 됩니다.
# aws-cli
$ aws configure
# serverless
$ serverless config credentials --provider aws --key <Access Key ID> --secret <Secret Access Key>
$ yarn install
$ yarn test
(과금 주의!)
$ serverless deploy
SLACK_TOKEN
과 SLACK_CHANNEL
을 등록해야 합니다.
# local
$ serverless invoke local --function imgs --data '{"pathParameters": {"encodedURI": "google.com"}}'
# aws
$ serverless invoke --function imgs --data '{"pathParameters": {"encodedURI": "google.com"}}'
과금에 주의해 배포 된 서비스를 삭제합니다.
$ serverless remove