Skip to content

this is convert pdf to image on aws lambda function with S3 events.

Notifications You must be signed in to change notification settings

htsuruo/sls-convert-pdf2img

Repository files navigation

sls-convert-pdf2img

convert pdf to image on aws lambda function with S3 events.

Env.

  • serverless-framework: 1.65.0
  • runtime: aws node.js 12.x

How to Run.

# 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]

Command Memo.

# 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

AWS - Invoke Local.

serverless invoke local --function functionName

Ref.

About

this is convert pdf to image on aws lambda function with S3 events.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published