Templates Plugins Courses

AWS Plugin - Delete Object

I recently got my bubble site running with the AWS plugin, however, I am having issues with the permissions somewhere. The following is working to let me put files and get files. However, the plugin is not successfully deleting objects yet. I feel like the workflow is OK, and it is mostly the permissions, but AWS is telling me that my JSON is wrong or has errors when I try to incorporate the DeleteObject. Any Ideas?

{
“Version”: “2008-10-17”,
“Id”: “Policy1408118342443”,
“Statement”: [
{
“Sid”: “Stmt1408118336209”,
“Effect”: “Allow”,
“Principal”: {
“AWS”: “ "
},
“Action”: “s3:GetObject”,
“Resource”: "arn:aws:s3:::seedocracy/
”,
“Condition”: {
“StringLike”: {
“aws:Referer”: [
https://seedocracy.com/ "
]
}
}
},
{
“Sid”: “S3PolicyStmt-DO-NOT-MODIFY-1591387482032”,
“Effect”: “Allow”,
“Principal”: {
“Service”: “s3.amazonaws.com
},
“Action”: “s3:PutObject”,
“Resource”: "arn:aws:s3:::seedocracy/
”,
“Condition”: {
“StringEquals”: {
“aws:SourceAccount”: “656689563107”,
“s3:x-amz-acl”: “bucket-owner-full-control”
},
“ArnLike”: {
“aws:SourceArn”: “arn:aws:s3:::seedocracy”
}
}
}
]
}

@zeroqode support did not give me any help - they instead instructed me to post here in forum… I assumed that meant I would get some help here???

Hi Lortie,
we usually ask to post on forum and we provide assistance there. Here is our forum link https://forum.zeroqode.com - also there you can find existing threads on AWS that I encourage you to go through
thanks!

Now I’m even more confused… @levon this post is on your forum. Support tells me to go to the forum and then on the forum I’m told to go to the forum.

I feel like this is probably a simple fix, I just haven’t been able to get it. Can anyone help?

Hello, @lortie.jason. Thanks for reaching out.

Please accept my apologies for the confusion you’ve faced.
The main message was to ask you to post all your tech questions here, on the ZQ Forum, because here we are providing users with the actual tech support. And also to ask you to search through the ZQ Forum in order to find any useful info on your issue (frequently, users can find the solution/pieces of advice on their concerns within the other posts on Forum). That’s all :slightly_smiling_face:

Regarding your issue, would you kindly check the plugin documentation regarding your request? There you can find a detailed description of the Permissions setup and JSON example.

AWS S3 Bucket located on the desired Server:
https://docs.zeroqode.com/plugins/aws-file-uploader-plugin#4-aws-s3-bucket-located-on-the-desired-server

Permissions:
https://docs.zeroqode.com/plugins/aws-file-uploader-plugin#permissions

I hope it helps :pray:
Regards,

Hey @kate, thanks for the reply.

I have followed all of the documentation you noted, and still, the delete file workflow does not seem to work. Could you please advise the correct workflow setup so I can confirm whether it is an issue with AWS settings or the Plugin workflow?

@kate I feel like the plugin is working correctly, you can see here in the Bubble debugger that the file URL is correctly listed in the workflow.

But after the workflow runs, the file still remains in the AWS bucket.

@lortie.jason,

Okay, I see. Let me please check this issue with our team. I will let you know the result of the investigation asap.

Thank you for understanding :pray:
Regards,

@lortie.jason, thank you for your patience :pray:

Our team has updated the plugin with a few fixes, that resolve the deleting/uploading file issue. Would you kindly update your plugin to the latest version and check the changes.

Also, if you will not succeed in deleting files after updating the plugin, please check out our demo page setup (workflows and plugin properties), and compare it with yours. On our side plugin is working with no issue.

Please check and confirm.
Regards,

@kate I can confirm that I can now delete files off AWS.

However, in continued testing I discovered another bug. Specifically, if I delete the page’s thing that the delete file action is tied to in the same workflow, then the key will come up empty. It seems as though Bubble is deleting the thing first, even though I have the delete file action listed as step 1 in the workflow. See below for the workflow and then the debugger.

image

image

When I remove the “delete thing” from the above workflow, the file key shows up as expected and the file is successfully deleted from AWS.

Is this a problem with the plugin or bubble?

@kate any ideas on what to do with this problem?

Hey @lortie.jason,

It is most likely that when you set the Key value to “Current Page Pitch’s Video File’s URL” and trigger the delete action, the removal of the “Video File’s URL” is expected behavior. It happens because you have deleted the Current Page Video File, and after deleting - there is nothing to operate with.

I’d like to suggest you change the Key value to something else (keeping the relation to the file you want to delete) - set the Key value requesting to the table where your video file URL is placed. (Or add “:first item”)
Or you may set the Delete file workflow as it is shown on the plugin demo page - this option will work for sure.


I hope it helps :pray:
Regards,