danilop / yas3fs

YAS3FS (Yet Another S3-backed File System) is a Filesystem in Userspace (FUSE) interface to Amazon S3. It was inspired by s3fs but rewritten from scratch to implement a distributed cache synchronized by Amazon SNS notifications. A web console is provided to easily monitor the nodes of a cluster.
http://danilop.github.io/yas3fs
MIT License
640 stars 98 forks source link

ERROR SNS topic ARN not found in region 'us-east-1' , use -h for help. #156

Closed cirrusnine closed 5 years ago

cirrusnine commented 6 years ago

When the option '--aws-managed-encryption' is invoked, the following permissions were required in addition to the standard documented ones or else the error "ERROR SNS topic ARN not found in region 'us-east-1' , use -h for help." was thrown:

  {
        "Sid": "kmskeypermissions",
        "Effect": "Allow",
        "Action": [
            "kms:Decrypt",
            "kms:Encrypt",
            "kms:ListKeys"
        ],
        "Resource": [
            "arn:aws:kms:region:acct:key/keyid"
        ]
    }

Also I added the following stanzas to the S3 bucket policy:

  {
        "Sid": "DenyIncorrectEncryptionHeader",
        "Effect": "Deny",
        "Principal": "*",
        "Action": "s3:PutObject",
        "Resource": "arn:aws:s3:::bucket/*",
        "Condition": {
            "StringNotEquals": {
                "s3:x-amz-server-side-encryption": "AES256"
            }
        }
    },
    {
        "Sid": "DenyUnEncryptedObjectUploads",
        "Effect": "Deny",
        "Principal": "*",
        "Action": "s3:PutObject",
        "Resource": "arn:aws:s3:::bucket/*",
        "Condition": {
            "Null": {
                "s3:x-amz-server-side-encryption": "true"
            }
        }
    }

I used the same key for self-created key for S3, SNS, and SQS, though I don't think that's strictly required. I used KMS materials, not external, although that should not make any real difference either.

jazzl0ver commented 5 years ago

Thanks for sharing! Added a link to this issue in the wiki