mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
service: service
|
|
|
|
configValidationMode: error
|
|
|
|
provider:
|
|
name: aws
|
|
runtime: nodejs16.x
|
|
versionFunctions: false
|
|
|
|
functions:
|
|
streamDynamoDb:
|
|
handler: core.streamDynamoDb
|
|
events:
|
|
- stream:
|
|
type: dynamodb
|
|
arn:
|
|
Fn::GetAtt: [DynamoDbTable, StreamArn]
|
|
batchWindow: 10
|
|
streamKinesis:
|
|
handler: core.streamKinesis
|
|
events:
|
|
- stream:
|
|
type: kinesis
|
|
arn:
|
|
Fn::Join:
|
|
- ':'
|
|
- - arn
|
|
- aws
|
|
- kinesis
|
|
- Ref: AWS::Region
|
|
- Ref: AWS::AccountId
|
|
- stream/${self:service}-kinesis
|
|
batchSize: 100
|
|
startingPosition: TRIM_HORIZON
|
|
batchWindow: 1
|
|
|
|
resources:
|
|
Resources:
|
|
DynamoDbTable:
|
|
Type: AWS::DynamoDB::Table
|
|
Properties:
|
|
AttributeDefinitions:
|
|
- AttributeName: id
|
|
AttributeType: S
|
|
BillingMode: 'PAY_PER_REQUEST'
|
|
KeySchema:
|
|
- AttributeName: id
|
|
KeyType: HASH
|
|
StreamSpecification:
|
|
StreamViewType: KEYS_ONLY
|
|
TableName: ${self:service}-table
|