You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cdk/README.md
+1-47Lines changed: 1 addition & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The outcome of the seed command above is 50 new channels and streams, 20 of thes
34
34
make seed JSON=./seed.example.json
35
35
```
36
36
37
-
***NOTE:** Please refer to the [seed.example.json file](./seed.example.json) so that you may create data that the DynamoDB client can use. Incorrect JSON data will lead to errors when seeding.*
37
+
**\*NOTE:** Please refer to the [seed.example.json file](./seed.example.json) so that you may create data that the DynamoDB client can use. Incorrect JSON data will lead to errors when seeding.\*
38
38
39
39
All the environment variables can be used together to generate mock data that suites your needs:
40
40
@@ -82,49 +82,3 @@ When the postStreamEvents function receives an event with a `session created` ev
82
82
When a `session ended` event is received, the corresponding stream record is grabbed and updated by removing the `isOpen` attribute.
83
83
84
84
You can find the Stream events API code in the `/streamEventsApi` folder.
85
-
86
-
## Scheduled resource cleanup AWS Lambdas
87
-
88
-
The scheduled resource cleanup lambdas are created when the stack is deployed. No additional steps are necessary to set up and trigger these functions. The lambda functions exist in the `cdk/lambdas` folder. The schedule can be customized in the `cdk/Makefile`. AWS Lambda supports standard rate and cron expressions for frequencies of up to once per minute. Read more about [schedule expressions using rate or cron](https://docs.aws.amazon.com/lambda/latest/dg/services-cloudwatchevents-expressions.html).
89
-
90
-
### Amazon IVS idle stages cleanup
91
-
92
-
The cleanup lambda function follows these steps:
93
-
1. It retrieves a list of all stages
94
-
2. The `getIdleStageArn` helper function is employed to filter out idle stages that have been in existence for at least 1 hour
95
-
3. Subsequently, the filtered idle stages are deleted.
96
-
97
-
### Amazon Cognito unverified users cleanup
98
-
99
-
The cleanup lambda function follows these steps:
100
-
1. It retrieves a list of users with a `UNCONFIRMED` status
101
-
2. Within the unconfirmed users, we filter for users that have existed for at least 24 hours
102
-
3. Finally, the filtered unverified and expired users are deleted both from the Cognito user pool and AWS DynamoDB channels table.
Amazon IVS host disconnect event cleanup is designed to delete active stages for which hosts have been disconnected from the session for at least 3 minutes. Upon a host's disconnection from a stage, the responsible endpoint follows these steps:
108
-
1. Extracts the host's channel ID from the request body, accommodating both object and JSON string formats
109
-
2. It retrieves the corresponding host details, including the stage and session, and formats them into a message body
110
-
3. This structured data is sent to an Amazon SQS queue for additional processing. It's important to highlight that the message comes with a 3-minute delay, allowing the host sufficient time to rejoin if they choose to
111
-
4. After 3-minute wait time, SQS triggers deleteStage lambda function.
2. Checks if the host is present in the stage for potential reconnection
126
-
3. If the host is not detected in the stage, deletes the stage
127
-
4. Updates the channel table to reflect changes such as the removal/nullification of the stageId and stageCreationDate fields.
128
-
129
-
### Amazon FIFO SQS
130
-
A FIFO queue using content body for message deduplication and a 3-minute delayed delivery, allowing the host sufficient time to rejoin if they choose to.
0 commit comments