Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masawada/private-docs-store
CloudFront (Basic auth with Lambda@Edge) + S3 (Slack notification with Lambda)
https://github.com/masawada/private-docs-store
Last synced: about 1 month ago
JSON representation
CloudFront (Basic auth with Lambda@Edge) + S3 (Slack notification with Lambda)
- Host: GitHub
- URL: https://github.com/masawada/private-docs-store
- Owner: masawada
- License: mit
- Created: 2021-08-19T01:09:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-03T14:55:34.000Z (about 3 years ago)
- Last Synced: 2024-04-14T11:54:14.722Z (9 months ago)
- Language: TypeScript
- Homepage:
- Size: 531 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Private Docs Store
The CDK stack creates these resources:
- CloudFront
- enabled Basic Authentication with Lambda@Edge
- S3 bucket
- When objects are put, a notification is sent to your Slack channel## Init
You must create the stack in the us-east-1 region.
```
$ npx cdk bootstrap --profile YOUR_PROFILE_NAME
$ npx cdk deploy PrivateDocsStoreStack --profile YOUR_PROFILE NAME
$ cp config/slackConfig.json.example config/slackConfig.json
$ cat config/slackConfig.json
{
"SLACK_BOT_TOKEN": "YOUR_SLACK_BOT_TOKEN",
"SLACK_SIGNING_SECRET": "YOUR_SLACK_SIGNING_SECRET",
"SLACK_CHANNEL_ID": "YOUR_SLACK_CHANNEL_NAME"
}
$ aws secrets manager update-secret --secret-id private-docs-store-secret --secret-string $(echo -n "YOUR_BASIC_USER:YOUR_BASIC_PASS" | base64) --profile YOUR_PROFILE_NAME
$ aws secrets manager update-secret --secret-id YOUR_SLACK_NOTIFIER_SECRET_NAME --secret-string file://config/slackConfig.json --profile YOUR_PROFILE_NAME
```note: The bot token requires the `chat.write` permission.