Frappe S3 Attachment steps - ashish-greycube/help GitHub Wiki
on local server
bench get-app https://github.com/shridarpatil/frappe-attachments-s3
bench --site studio.greycube.in install-app frappe_s3_attachment
if required
source env/bin/activate
pip3 install python-magic -U
pip3 install botocore -U
pip3 install boto3 -U
create bucket first and then generate access key for user also, put 2 public off at time of bucket creation
###[A] to get AWS Key/AWS Secret
go to security credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*",
"s3-object-lambda:*"
],
"Resource": "*"
}
]
}
2) create access key
3) put keys in S3 File Attachment
###[B] get bucket and folder name
- from services->storage-->s3
- create bucket : choose acl enabled and correct aws region
- unblock public access and first checkbox and click create bucket
- go inside bucket and click create folder (with defaults)
- copy bucket name/region name to frappe s3
###[C] go to any doctype and attach file, it should get uploaded to s3 amazon
create bucket with name and ACL is enabled
create folder in bucket
create user ( go to service credentials)
attach policy to user "amazon s3 full access"
copy user's arn : arn:aws:iam::xx:user/signum_user1
go to bucket permissions, ublock first 2
edit bucket policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddCannedAcl",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XX:user/signum_user1"
},
"Action": [
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::testme1/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "public-read"
}
}
}
]
}
create access key for the user -- select Application running outside AWS