-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
68 lines (57 loc) · 1.46 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Welcome to Serverless!
#
# Author Nikita Kozlov, 2022
vars:
ddbTableName: ImageDescription-dev
service: image-storage-service
# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221
# you can overwrite defaults here
stage: dev
region: us-east-2
profile: dev-sls-admin-us-east-2
# you can add statements to the Lambda function's IAM Role here
iam:
role:
statements:
- Effect: "Allow"
Action:
- "dynamodb:*"
Resource: !Join
- '/'
- - "arn:aws:dynamodb:${self:provider.region}:*:table"
- !ImportValue ImageDescriptionTable
# you can add packaging information here
package:
patterns:
- '!.idea/**'
- '!presentation/**'
- '!_dev/**'
- '!staging/**'
- '!infra/**'
functions:
imageStorageService:
handler: handler.run
events:
- httpApi:
path: /image
method: '*'
# Define function environment variables here
environment:
DDB_TABLE: ${self:vars.ddbTableName}
# you can add CloudFormation resource templates here
#resources:
# extensions:
# HttpApiStage:
# Properties:
# StageName: "stage-http-api-overrides"
plugins:
- serverless-plugin-typescript