flesh out README.md and add MIT license
This commit is contained in:
@@ -19,4 +19,27 @@ A [Makefile](https://www.gnu.org/software/make/manual/make.html) has been set up
|
||||
|
||||
## Running in AWS
|
||||
|
||||
This function runs in AWS Lambda and uses SSM to store state like the `last-run-time`. The function will read and write parameters under the `/rss-nostr-lambda` path in Parameter Store; be sure to [grant the proper permissions](https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html) or this function will fail.
|
||||
This function runs in AWS Lambda and uses SSM to store state like the `last-run-time`. The function will read and write parameters in Parameter Store under the paths provided in the event spec below; be sure to [grant the proper permissions](https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html) or this function will fail.
|
||||
|
||||
The function requires the `AWS_REGION` environment variable to be set. This should already be set for you by AWS Lambda.
|
||||
|
||||
### Event Specification
|
||||
|
||||
This Lambda function expects the following event to be passed in:
|
||||
|
||||
``
|
||||
{
|
||||
"feedUrl": String - The url of the RSS feed,
|
||||
"nostrNsecParam": String - The path of the SSM parameter holding the nsec,
|
||||
"lastRunTimeParam": String - The path of the SSM parameter holding the last run time
|
||||
}
|
||||
```
|
||||
|
||||
## Things to be awre of
|
||||
|
||||
The following are not ideal and may be changed in the future:
|
||||
|
||||
- This function uses a checkpointing algorithm based on the last run time. If the last run time is set to too long of a timeframe this function will timeout and misbehave. It's recommended to set the last run time to something recent -- like the last day or two.
|
||||
- This function does not generalize a way to provide the path to the needed data in the RSS feed.
|
||||
- This function hard-codes in the https://nostr.build URL. This is tightly coupled to using that service and provides no alternatives.
|
||||
- Further, if the function fails to upload the image to https://nostr.build it will simply remove the image entirely. There's room to improve this.
|
||||
|
||||
Reference in New Issue
Block a user