Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danerwilliams/pstb.in
📋 Pastebin and url shortener
https://github.com/danerwilliams/pstb.in
aws chalice javascript lambda python s3 serverless
Last synced: 10 days ago
JSON representation
📋 Pastebin and url shortener
- Host: GitHub
- URL: https://github.com/danerwilliams/pstb.in
- Owner: danerwilliams
- License: mit
- Created: 2020-12-20T20:44:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T21:11:01.000Z (over 3 years ago)
- Last Synced: 2023-10-20T19:11:32.914Z (about 1 year ago)
- Topics: aws, chalice, javascript, lambda, python, s3, serverless
- Language: Python
- Homepage: http://pstb.in
- Size: 2.14 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pstb.in
> Pastebin and url shortener made in serverless AWS![screenshot](./screenshot.jpg)
## Permissions
S3 buckets permissions have given me many issues, here are my settings:
Bucket Policy:
```
{
"Version": "2012-10-17",
"Id": "Policyxxxxxxxxxxx",
"Statement": [
{
"Sid": "Stmtxxxxxxxxxxx",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucketName/*"
},
{
"Sid": "Stmtxxxxxxxxxxxxx",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::xxxxxxxxxxxx:role/roleName"
},
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectTagging"
],
"Resource": "arn:aws:s3:::bucketName/*"
},
{
"Sid": "Stmtxxxxxxxxxxxxxx",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::xxxxxxxxxxxx:role/roleName"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::bucketName"
}
]
}
```
CORS Configuration:
```
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
```## Troubleshooting
* Chalice may cause permissions issues with the generated lambda functions, see [this issue](https://github.com/aws/chalice/issues/1606)