It was working fine few day back , I was able to delete the object in S3 bucket. But now I getting Access Denied. I don't know what i did wrong. I am preforming these operation using AWS SDK in Node.Js
I am able to get and upload the objects(files) from S3 but not able to delete
Here is the permission(bucket policy) for bucket
{
"Version": "2012-10-17",
"Id": "Policy1632224975311",
"Statement": [
{
"Sid": "Stmt1632224935425",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:DeleteObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::bg-app-file-upload/*"
}
]
}
The IAM user policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::bg-app-file-upload",
"arn:aws:s3:::bg-app-file-upload/*"
]
}
]
}
Please help me out here.