vladholubiev / serverless-libreoffice

Run LibreOffice in AWS Lambda to create PDFs & convert documents
https://vladholubiev.com/serverless-libreoffice
513 stars 75 forks source link

some documentation for the terraform configuration? #6

Closed jfix closed 6 years ago

jfix commented 6 years ago

Hello, I'd like to port your lambda configuration from terraform to serverless, but I don't know terraform. Is there a chance that you could provide some details of what the different terraform files are meant for? Thanks for this cool project! 👍

vladholubiev commented 6 years ago

Hey @jfix

Here is an approximate serverless.yml, I didn't deploy it, but it's fairly simple and should suffice.

service: pdf

provider:
  name: aws
  runtime: nodejs8.10
  iamRoleStatements:
    - Effect: "Allow"
      Action:
        - xray:PutTraceSegments
        - xray:PutTelemetryRecords
      Resource:
        - "*"

    - Effect: Allow
      Action:
        - s3:PutObject
        - s3:PutObjectAcl
      Resource:
        - arn:aws:s3:::serverless-libreoffice-demo/*

functions:
  hello:
    handler: src/handler.hello
    memorySize: 3008 
    timeout: 60
jfix commented 6 years ago

Thanks @vladgolubev I'll try that.

vladholubiev commented 6 years ago

Check out a new step-by-step guide - https://github.com/vladgolubev/serverless-libreoffice/blob/master/STEP_BY_STEP.md