Deleting Files From Amazon S3
  • Updated on 05 Mar 2019
  • 1 minute to read
  • Print
  • Dark
    Light

Deleting Files From Amazon S3

  • Print
  • Dark
    Light

Amazon Web Services S3 offers cloud-based storage that can be integrated with your system. Users can view, monitor and delete files stored in the cloud.  To allow a user to delete the files in your Amazon S3 account, first set up your Amazon web services Settings in the portal (Links are attached below). Configure the flow in the Flow Designer by dragging a DeleteFileFromS3 component to the workspace, and mapping its strings in the Mapping Editor.

Example

Start by navigating to the chosen designer folder,  selectCreate Flow in the blueaction panel across the bottom of theDesigner Studio .
Create-new-flow.jpg

In the Steps Tab locate  Integration, Amazon AWS> S3, choose Delete Fille from S3 , drag and drop step into flow designer . Next Locate List Objects also listed under  S3, drag and drop into the flow designer. Connect the pathways from the Start step and the End step, as shown in the image below.
delete-file-with-add-list-step.jpg

Delete File From S3 Step:

In the properties tab under Common Properties and under Inputs>bucket Name set toConstant and enter your Amazon S3 File, Bucket name. Under Inputs> File set toConstant and upload or drag and drop File. Under Inputs> Key set to Constant and name the key specific to the field, you want to delete off of Amazon S3. Under Inputs> Region set toConstant and define its value. This Region must match the Region that is set in the default region set in system settings during install. Set the Region the appropriate region code, in this example we usedus-east-1.
delete-files.jpg

List Objects Step:

In the properties tab under Common Properties under Inputs and next to bucket name set the value to Constant and enter your Amazon file S3 bucket name. Under Outputs and next to Outputs select Rename and enter ListObjects1_Output as the name.

bucket-name-constant.jpg

The completes the delete file from Amazon S3 flow, save and exit the flow.

Run Flow

Run the flow and check that the step works. You can do this either by selecting Debug in the Flow Designer , or you can close the Flow Designer , right click on the Flow, and select Run Flow. After the flow is run check the outputs of the Delete File From S3 step to verify that the Key specified was deleted.

Was this article helpful?