BetterTwitFix/serverless.yml
Dylan 7ff1031627 Squashed commit of the following:
commit 4fe0af4e6a4a15ee4796a857e79ad0fe9b72c0f1
Author: Dylan <dylanpdx@gmail.com>
Date:   Wed Dec 28 18:09:25 2022 +0000

    Misc. changes to MP4 Looping function

commit 42ef8845c38c5a74e56da3c5f035d5a6c091c86a
Author: Dylan <dylanpdx@gmail.com>
Date:   Tue Dec 27 20:00:22 2022 +0000

    Abandoning raw gif conversion for now; looping vid instead

commit b61938b340a02ac8cfab02048b7e9deaf87edbf5
Author: Dylan <dylanpdx@gmail.com>
Date:   Tue Dec 27 19:38:58 2022 +0000

    More work on WIP gif generation

commit 3bc6e7e0da1ce6ae905c80bbbaaa55a68050de52
Author: Dylan <dylanpdx@gmail.com>
Date:   Mon Dec 26 14:46:46 2022 +0000

    Experimental gif conversion
2022-12-28 18:22:11 +00:00

78 lines
2.0 KiB
YAML

service: vxTwitter
provider:
name: aws
runtime: python3.8
stage: dev
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource:
- { "Fn::GetAtt": ["vxTwitterDynamoTable", "Arn" ] }
environment:
VXTWITTER_CACHE_TABLE: ${self:custom.tableName}
RUNNING_SERVERLESS: 1
VXTWITTER_LINK_CACHE: ${env:VXTWITTER_LINK_CACHE, 'json'}
VXTWITTER_DATABASE: ${env:VXTWITTER_DATABASE, 'none'}
VXTWITTER_METHOD: ${env:VXTWITTER_METHOD, 'hybrid'}
VXTWITTER_COLOR: ${env:VXTWITTER_COLOR, '#43B581'}
VXTWITTER_APP_NAME: ${env:VXTWITTER_APP_NAME, 'vxTwitter'}
VXTWITTER_REPO: ${env:VXTWITTER_REPO, 'https://github.com/dylanpdx/BetterTwitFix'}
VXTWITTER_URL: ${env:VXTWITTER_URL, 'https://vxtwitter.com'}
VXTWITTER_COMBINATION_METHOD: ${env:VXTWITTER_COMBINATION_METHOD, 'local'}
VXTWITTER_GIF_CONVERT_API: ${env:VXTWITTER_GIF_CONVERT_API, ''}
package:
patterns:
- '!node_modules/**'
- '!venv/**'
plugins:
- serverless-wsgi
- serverless-python-requirements
- serverless-plugin-common-excludes
- serverless-plugin-include-dependencies
functions:
vxTwitterApp:
handler: wsgi_handler.handler
url: true
timeout: 5
memorySize: 150
layers:
- Ref: PythonRequirementsLambdaLayer
custom:
tableName: 'tweets-table-${self:provider.stage}'
wsgi:
app: twitfix.app
pythonRequirements:
layer: true
dockerizePip: false
resources:
Resources:
vxTwitterDynamoTable:
Type: 'AWS::DynamoDB::Table'
Properties:
AttributeDefinitions:
-
AttributeName: tweet
AttributeType: S
KeySchema:
-
AttributeName: tweet
KeyType: HASH
TableName: ${self:custom.tableName}
BillingMode: PAY_PER_REQUEST
TimeToLiveSpecification:
AttributeName: ttl
Enabled: true