AWS-S3 Bucket creation access and Life cycle policy
Amazon S3 to store and retrieve any amount of data at any time, from anywhere.An object consists of a file and optionally any metadata that describes that file.
Amazon S3 is object storage built to store and retrieve any amount of data from anywhere. S3 is a simple storage service that offers industry leading durability, availability, performance, security, and virtually unlimited scalability at very low costs.
You can create up to 100 buckets in each of your AWS cloud accounts,If needed, you can request up to 1,000 more buckets by submitting a service limit increase.
Lets see how to creat a S3 Bucket and upload file.
-On the above we have seen to view the upload files via presigned URL.
Another way to view the files
select the file > permissions > Uncheck block all public access.Bucket policy > edit bucket policy >Policy generator.
- Open as new tab to generate policy, we have select the s3 bucket policy followed by "Get Object" and copy the Amazon Resource Name(ARN) from the uploaded file.
- Once policy generated copy the policy and paste on the Bucket policy >policy >save.
- Via file "object URL" You can access the file on public.
- AWS S3 Object storage classes, by default comes with "Standard" you can modify via Action >Edit storage class.
- If you modified the local file and uploaded to S3 you want version basis need to enable "Bucket versioning" Properties > Bucket versioning >Edit.
Once you enabled the versioning able suspend (not to disable)
the file1.txt was edited locally and uploaded to S3 bucket to see the versioning.
Life cycle rule
A lifecycle policy consists of one or more rules that determine which images in a repository should be expired.
Lifecycle policies help manage and automate the life of your objects within S3, preventing you from leaving data unnecessarily available. They make it possible to select cheaper storage options if your data needs to be retained, while at the same time, adopting additional security control from Glacier.
- Click on your bucket.
- Click on Management tab.
- Click on Create lifecycle rule.
- First, give a name for the rule.
- Then choose a rule scope. ...
- If you choose to apply the rule to all objects then choose βApply to all objects in the bucketβ. ...
- You can specify the transition for each option.