Ghost integration with s3 is not working

0

I'm using ghost-s3-adapter for the integration of s3 and ghost, below is the code snippet of config.develpoment.json


  "storage": {
  "active": "s3",
  "s3": {
    "accessKeyId": "your key",
    "secretAccessKey": "secretAccessKey",
    "region": "location",
    "bucket": "bucket name",
    "acl":"private"
  }
}

and my bucket policy is

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::bucket-name"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutObjectVersionAcl",
                "s3:DeleteObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::bucket-name/*"
        }
    ]
}

Object is properly stored in the s3 bucket but when I need to get it gives me 403 forbidden error Enter image description here

Can Anyone helps me with the same

asked a year ago232 views
1 Answer
0

Make sure that the role or principal that you are using to read the objects from S3 has a policy that contains s3:GetObject. I would recommend that you don't use bucket policies. They make this much harder. Prefer to use only IAM. Please read the following documentation S3 access management

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions