latex-aws-lambda-layer/example/template.yaml
2019-05-23 15:21:16 +02:00

48 lines
1.1 KiB
YAML

AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: >
Example project demonstrating the usage of the Latex Layer for AWS Linux 2 runtimes.
Parameters:
LatexLayer:
Type: String
Resources:
UploadBucket:
Type: AWS::S3::Bucket
ResultsBucket:
Type: AWS::S3::Bucket
ConvertFileFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Timeout: 180
MemorySize: 1024
Runtime: nodejs10.x
CodeUri: src
Layers:
- !Ref LatexLayer
Policies:
- S3CrudPolicy:
BucketName: !Sub "${AWS::StackName}-*"
Environment:
Variables:
OUTPUT_BUCKET: !Ref ResultsBucket
PATH: '/opt/texlive/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Events:
FileUpload:
Type: S3
Properties:
Bucket: !Ref UploadBucket
Events: s3:ObjectCreated:*
Outputs:
UploadBucket:
Description: "Upload S3 bucket"
Value: !Ref UploadBucket
ResultsBucket:
Description: "Results S3 bucket"
Value: !Ref ResultsBucket