Transfer Family Error

0

Hello, I am receiving an error when using Amazon Transfer for SFTP. I can list and delete objects but I cannot write new objects. I receive error "open for write: Access denied." I have the below permissions policy (I have edited the last line of the policy to remove sensitive information).

{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": "arn:aws:s3:::${transfer:HomeBucket}", "Condition": { "StringLike": { "s3:prefix": [ "${transfer:HomeFolder}/", "${transfer:HomeFolder}" ] } } }, { "Sid": "", "Effect": "Allow", "Action": [ "s3:PutObjectACL", "s3:PutObject", "s3:GetObjectVersion", "s3:GetObjectACL", "s3:GetObject", "s3:DeleteObjectVersion", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::${transfer:HomeDirectory}/", "arn:aws:s3:::${transfer:HomeDirectory}*" ] }, { "Sid": "", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Encrypt", "kms:Decrypt" ], "Resource": "arn:aws:kms:us-east-1:111111:key/111111" } ] }

  • It seems content of your policy is broken because of formatting. Can you try to format it using Markdown syntax (wrap it into triple backticks)?

2개 답변
0

Good day.

Per your policy, it appears that you have an implicit deny (not permit) on the bucket to PutObjects. Because of this, the individual objects do not have anything to inherit for write actions.

You should be able to adjust this by adding each object as a resource along with the folder that you added: "Resource": "arn:aws:s3:::${transfer:HomeDirectory}/", "arn:aws:s3:::${transfer:HomeDirectory}/*",

Hope this helps!

Jason H.

AWS
Jason_H
답변함 2년 전
0

I think you just need to change the second policy to apply to all directory's objects like that

{
    "Effect": "Allow",
    "Action": [
        "s3:PutObjectACL",
	"s3:PutObject",
	"s3:GetObjectVersion",
	"s3:GetObjectACL",
	"s3:GetObject",
	"s3:DeleteObjectVersion",
	"s3:DeleteObject"
    ],
    "Resource": "arn:aws:s3:::${transfer:HomeDirectory}/*"
},
profile picture
MG
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠