flesh out README.md and add MIT license
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 David Lick
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -19,4 +19,27 @@ A [Makefile](https://www.gnu.org/software/make/manual/make.html) has been set up
|
|||||||
|
|
||||||
## Running in AWS
|
## 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