-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Use aws-cdk to deploy an AWS Lambda based server-less version of the app #5
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And run `npm install` to generate `package-lock.json`.
This is where I'll add custom code to define the AWS resources which make up the stack.
This rule currently has no target and so won't do anything, but it's a small step on the way.
Note that Ruby lambda functions cannot currently be "inline"; they have to be in a separate file.
Note this is closely based on the original instructions [1]. [1]: https://github.com/freerange/trello_backup/blob/a99bacf2f663c899a76947dd91810c6ee353d429/README.md#generatingstoring-the-tokens-you-need-to-use-this-script
Note that unfortunately the trello gem currently (rather unnecessarily) has an indirect dependency on the unf gem which has native extensions. When I was trying this previously, I thought I ran into problems because the extensions were being built on my local machine using Mac OSX (x86_64-darwin-17), but were being deployed and run in an AWS Lambda function which is an x86_64-linux platform. Previously I had used Docker to build the extensions for the correct platform, however, when I just tried deploying and running the function as it stands (with Mac OSX-build extensions), it seemed to work OK, so maybe the whole Docker thing was unnecessary!
I've chosen to use the board ID rather than a normalized version of the board name for the S3 object key, because this is a lot less likely to change over time. There's no need to include a timestamp in the S3 object key, because the S3 bucket has versioning enabled.
This means all the env vars are obtained at the same level.
To minimize the size of the zip file uploaded to AWS.
And reduce the size of the zip file uploaded to AWS.
And reduce the size of the zip file uploaded to AWS.
I noticed this was missing when I was comparing this project with the `trello-full-backup` Python package [1]. [1]: https://pypi.org/project/trello-full-backup/
Move key & token to beginning of list and order the remaining keys alphabetically.
This should hopefully speed up the API response time.
To make its purpose clearer.
I'm planning to use this topic for monitoring as well as alarms.
No need to include "Trello" in constant name.
No need to repeat "Trello" in constant/function name.
No need to repeat "Trello" in constant/function name.
No need to repeat "Trello" in constant/function name.
TRELLO_BOARD_BACKUPS -> TRELLO_BACKUP.
BACKUP_TRELLO_BOARD_TOPIC_ARN -> TRELLO_BACKUP_BACKUP_BOARD_TOPIC_ARN. This makes the code more consistent.
I want to introduce another schedule expression and this change which makes the name more specific will make that easier.
Again this will make it easier to add another schedule expression rule.
Sends an email indicating whether the backup of all boards was successful or not.
I'm going to leave this running for a day or two, but, now that I've addressed all the issues in https://github.com/freerange/trello_backup/milestone/1, I then plan to merge this into |
This seems to have been running without problems for a few days. I've just downloaded all the JSON backup files and (although I haven't looked at them in detail) they look OK to me. So I'm going to merge this PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've made the repo private in order to publish this PR on the off-chance we decide it's worth trying to offer the functionality as a paid service.
I've created a milestone with a bunch of issues we might want to tackle before switching over to using the new version.