Managing Object Operations in S3 Bucket: Uploading, Downloading, Copying, and Deleting Objects, Including Bucket Deletion

Managing Object Operations in S3 Bucket: Uploading, Downloading, Copying, and Deleting Objects, Including Bucket Deletion

Managing Object Operations in S3 Bucket: Uploading, Downloading, Copying, and Deleting Objects, Including Bucket Deletion


Hi everyone welcome to Amazon S3 part5, In this blog we will learn about Managing Object Operations in S3 Bucket: Uploading, Downloading, Copying, and Deleting Objects, Including Bucket Deletion in Amazon s3. if you don't know how to create bucket. So, I would recommend you to read previous article. Read Previous Article Amazon S3 part4: Getting started with Amazon S3 || Create your first S3 bucket 

 Upload an object to your bucket

Once you have successfully created a bucket in Amazon S3, you can proceed to upload various types of files, such as text documents, photos, videos, and more, into the bucket.

To perform an object upload to a bucket, follow these steps:

Access the Amazon S3 console by visiting https://console.aws.amazon.com/s3/. From the list of Buckets, select the desired bucket where you wish to upload the object. On the Objects tab specific to the chosen bucket, click on the Upload option. Within the Files and folders section, click on Add files.

Select the file you want to upload and click Open.

Finally, click on the Upload button.

Congratulations! You have successfully completed the object upload to your bucket.

Download an object

Once you have uploaded an object to a bucket, you have the option to access its information and download it to your local computer.

 By utilizing the S3 console, you can learn how to download an object from an S3 bucket using a presigned URL. 

It's important to note that you can only download one object at a time. Additionally, if an object's key name ends with periods (.), using the Amazon S3 console to download it will result in the removal of the periods (.) from the downloaded object's key name. 

To preserve the periods (.) in the downloaded object's key name, you need to utilize the AWS Command Line Interface (AWS CLI), AWS SDKs, or REST API. For detailed information and examples on using AWS CLI, REST API, and AWS SDKs, please refer to the guide on downloading an object.

To retrieve a file from an S3 bucket, follow these steps:

  • Log in to the AWS Management Console and access the Amazon S3 console by visiting https://console.aws.amazon.com/s3/.
  • From the list of buckets, select the desired bucket where the object is located.
  • There are several methods to download an object from the S3 bucket:
  • Choose the object and click on "Download," or select "Download as" from the Actions menu if you wish to specify a folder for the download.
  • If you need to download a particular version of the object, click on the "Show versions" button. Select the desired version and choose "Download" or "Download as" from the Actions menu to specify a folder.
  • Your object has been successfully downloaded.

Copy your object to a folder

After successfully adding an object to a bucket and downloading it, proceed to create a folder where you can then copy the object and paste it into.

To copy an object to a folder, follow these steps:

  1. From the Buckets list, select your bucket name.
  2. Click on Create folder and configure the new folder by:
  3. Providing a folder name (e.g., favorite-pics).
  4. Choosing to disable folder encryption.
  5. choose save.
  6. Go to the Amazon S3 bucket or folder that contains the objects you wish to copy.
  7. Mark the checkbox next to the names of the objects you want to copy.
  8. Click on Actions and select Copy from the available options. Alternatively, choose the Copy option located in the upper right corner.
  9. Select the destination folder by:
  10. Clicking on Browse S3.
  11. Choosing the option button next to the folder name. If you want to navigate into a folder and select a subfolder as the destination, click on the folder name. Clicking on Choose destination.
  12. The path to your destination folder will be displayed in the Destination box. Alternatively, you can manually enter your destination path, such as s3://bucket-name/folder-name/.
  13. Finally, click on Copy located at the bottom right corner.
  14. Amazon S3 will proceed to copy your objects to the designated destination folder."

Deleting an object

When you no longer have a need for an object or a bucket, it is advisable to delete them in order to prevent additional charges. If you have completed the introductory walkthrough for learning purposes and have no plans to utilize your bucket or objects, it is recommended to delete both the bucket and objects to halt any further accrual of charges. Prior to deleting your bucket, ensure that it is either empty or that the objects within it have been deleted. Once you have deleted the objects and bucket, they will no longer be accessible. If you wish to continue using the same bucket name, it is suggested that you delete the objects or empty the bucket without deleting the bucket itself. Deleting a bucket makes the name available for reuse, although there is a possibility that another AWS account may create a bucket with the same name before you have an opportunity to reuse it.
You have the option to delete a specific object from your bucket without emptying all the objects if you wish to select which objects to delete.
  1.  In the Buckets list, choose the name of the bucket that you want to delete an object from.
  2.  Select the object that you want to delete.
  3.  Choose Delete from the options in the upper right.
  4.  On the Delete objects page, type delete to confirm deletion of your objects.
  5.  Choose Delete objects

Emptying your bucket

Before deleting your bucket, make sure to empty it, as this action will remove all the objects contained within the bucket.

To empty a bucket

  • In the Buckets list, select the bucket that you want to empty, and then choose Empty.
  • To confirm that you want to empty the bucket and delete all the objects in it, in Empty bucket, type permanently delete.
Important
Emptying the bucket cannot be undone. Objects added to the bucket while the empty
bucket action is in progress will be deleted.
  • To empty the bucket and delete all the objects in it, and choose Empty.
  • An Empty bucket: Status page opens that you can use to review a summary of failed and successful
  • object deletions.
  • To return to your bucket list, choose Exit

Deleting your bucket

Once you have emptied your bucket or removed all the objects from it, you are able to proceed with deleting the bucket.
  • To delete a bucket, in the Buckets list, select the bucket.
  • Choose Delete.
  • To confirm deletion, in Delete bucket, type the name of the bucket.
Important
Deleting a bucket cannot be undone. Bucket names are unique. If you delete your bucket,
another AWS user can use the name. If you want to continue to use the same bucket name,
don't delete your bucket. Instead, empty and keep the bucket.
  • To delete your bucket, choose Delete bucket.
Thanks for reading Amazon s3 part6 is coming soon.

Post a Comment

0 Comments