speelycaptor/serverless.prod.yml

53 строки
1.4 KiB
YAML
Исходник Обычный вид История

2019-07-12 19:30:35 +03:00
service: speelycaptor
provider:
name: aws
runtime: nodejs8.10
stackName: speelycaptor-${opt:stage, 'dev'}
stage: ${opt:stage, 'dev'}
region: ${file(config.json):speelycaptor-region}
2019-07-13 02:56:10 +03:00
timeout: 120
memorySize: 3000
2019-07-12 19:30:35 +03:00
role: ${file(config.json):speelycaptor-iam-role}
deploymentBucket:
name: ${file(config.json):speelycaptor-bucket-id}
vpc:
securityGroupIds:
- ${file(config.json):speelycaptor-security-group}
subnetIds: ${file(config.json):speelycaptor-subnet-ids}
endpointType: private
resourcePolicy:
- Effect: Allow
Principal: "*"
Action: execute-api:Invoke
Resource:
- execute-api:/*/*/*
Condition:
StringEquals:
aws:sourceVpc: ${file(config.json):speelycaptor-vpc-id}
functions:
2019-07-13 02:56:10 +03:00
initialize:
handler: index.init
environment:
scratchBucketRegion: ${file(config.json):speelycaptor-region}
2019-07-20 07:02:34 +03:00
scratchBucketId: ${file(config.json):speelycaptor-scratch-bucket-id}
2019-07-13 02:56:10 +03:00
events:
- http:
method: get
path: init
convert:
handler: index.convert
2019-07-20 07:28:54 +03:00
layers:
- ${file(config.json):ffmpeg-lambda-layer-arn}
2019-07-13 02:56:10 +03:00
environment:
scratchBucketRegion: ${file(config.json):speelycaptor-region}
2019-07-20 07:02:34 +03:00
scratchBucketId: ${file(config.json):speelycaptor-scratch-bucket-id}
2019-07-12 19:30:35 +03:00
events:
- http:
method: get
path: convert
plugins:
- serverless-offline