Skip to content

Commit

Permalink
Configure the environment and CD pipeline to execute new Feast Lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwadeson committed Mar 21, 2024
1 parent b3f1c94 commit 85ed08e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ jobs:
- tsc-target/user-subscriptions.zip
mobile-purchases-feast-apple-pubsub:
- tsc-target/feast-apple-pubsub.zip
mobile-purchases-feast-apple-update-subscriptions:
- tsc-target/feast-apple-update-subscriptions.zip
27 changes: 27 additions & 0 deletions cloudformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,33 @@ Resources:
- Ref: AlarmTopic
TreatMissingData: notBreaching

UpdateFeastAppleSubscriptionsLambda:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Sub ${App}-feast-apple-update-subscriptions-${Stage}
Code:
S3Bucket: !Ref DeployBucket
S3Key: !Sub ${Stack}/${Stage}/${App}-feast-apple-update-subscriptions/feast-apple-update-subscriptions.zip
Environment:
Variables:
App: !Sub ${App}
Stack: !Sub ${Stack}
Stage: !Sub ${Stage}
Description: Consumes Feast subscription data updates from app store from sqs and stores them in dynamo
Handler: feast-apple-update-subscriptions.handler
MemorySize: 512
Role: !GetAtt MobilePurchasesLambdasRole.Arn
Timeout: 25
Runtime: nodejs14.x

FeastAppleSubscriptionsEventSource:
Type: AWS::Lambda::EventSourceMapping
Properties:
FunctionName: !Ref UpdateFeastAppleSubscriptionsLambda
Enabled: true
EventSourceArn: !GetAtt FeastAppleSubscriptionsQueue.Arn
BatchSize: 1

FeastAppleSubscriptionDlqDepthAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
Expand Down
6 changes: 6 additions & 0 deletions riff-raff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ deployments:
functionNames: [mobile-purchases-feastapplepubsub-]
fileName: feast-apple-pubsub.zip

mobile-purchases-feast-apple-update-subscriptions:
template: lambda
parameters:
functionNames: [mobile-purchases-feast-apple-update-subscriptions-]
fileName: feast-apple-update-subscriptions.zip

mobile-purchases-google-pubsub:
template: lambda
parameters:
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const getEntries = (env) => {
"export-subscription-events-table": "./typescript/src/export/exportEvents.ts",
"export-historical-data": "./typescript/src/export/exportHistoricalData.ts",
"apple-revalidate-receipts": "./typescript/src/revalidate-receipts/appleRevalidateReceipts.ts",
"feast-apple-pubsub": "./typescript/src/feast/pubsub/pubsub.ts"
"feast-apple-pubsub": "./typescript/src/feast/pubsub/pubsub.ts",
"feast-apple-update-subscriptions": "./typescript/src/feast/update-subs/updatesubs.ts",
};
return env.production ? entries : {
...entries,
Expand Down

0 comments on commit 85ed08e

Please sign in to comment.