convert pdf to image on aws lambda function with S3 events.
- serverless-framework: 1.65.0
- runtime: aws node.js 12.x
# package install
$ npm i
# run local server
$ npm start
( $ npx sls offline start )
# put object to s3 bucket
$ npm run put [filePath]
# run a function
$ npm run func [functionName]
# install
$ npm i -g serverless
# version
$ npx sls -v
or
$ npx serverless -v
# create project for nodejs
$ npx sls create -t aws-nodejs -p my-service
# offline start
$ npx sls offline start
# deploy
$ npx sls deploy -v
# deploy with stage
$ npx sls deploy --stage prod
# delete project
$ npx sls remove
# put object to s3
$ aws --endpoint http://localhost:8000 s3api put-object --bucket local-bucket --key docs/ --body ~/Desktop/test.pdf --profile s3rver
※ accessid and keyid ⇒ [ S3RVER ]
# run function
$ npx sls invoke local --function functionName
serverless invoke local --function functionName
- Serverless Frameworkの使い方まとめ
- Serverless + TypeScript + AWS Lambdaの開発環境構築
- Serverless Frameworkで環境変数を外部ファイルから読み込み、環境毎に自動で切り替えてみる
- npm-scriptsについて