Assignment-4
Create a private bucket in AWS. Upload a file and check by presigned
URL that you can access the file or not.
Instruction Steps
1. Sign In to AWS
Log in to the AWS Management Console.
Navigate to the Amazon S3 service by selecting it from the AWS services list.
2. Create a Private Bucket
1. In the S3 console, click on Buckets in the left navigation pane.
2. Select the Create bucket button.
3. Provide a unique name for your bucket (e.g., myprivatebucket).
o Ensure the name:
Is unique globally.
Has 3-63 characters, including lowercase letters, numbers, dots (.), or
hyphens (-).
o Remark: Avoid using dots unless hosting a static website.
4. Select the desired AWS Region for your bucket.
5. Under Object Ownership, choose "Bucket owner enforced" to disable ACLs and enforce
bucket-level permissions.
6. Enable the Block Public Access settings by checking the appropriate checkboxes.
o Remark: This ensures the bucket remains private and inaccessible to the public.
7. Click Create bucket.
3. Upload Files to the Bucket
1. After the bucket is created, it will appear in the bucket list. Click on your newly created
bucket.
2. In the bucket view, click Upload.
3. On the upload page:
o Click Add files to select the file(s) you want to upload.
o Click Upload to complete the process.
4. Verify Upload:
o The uploaded files will be visible in the bucket.
4. Test File Privacy
1. Select the uploaded file and locate its Object URL in the file's properties.
2. Open the Object URL in a web browser.
o Expected Output: You should see an "Access Denied" message, indicating the file is
private.
5. Create a Presigned URL
1. Go to your bucket and locate the uploaded file.
2. Select the file and click on Actions > Share with presigned URL.
3. Specify the expiration time for the presigned URL.
o Remark: Choose an appropriate time based on the required access duration (e.g., 10
minutes, 1 hour).
4. Click Create presigned URL.
6. Access the File Using the Presigned URL
1. Copy the generated presigned URL.
2. Paste the URL into a new browser tab and press Enter.
3. Expected Output: The file will be accessible publicly until the URL expires.
Additional Notes
Security Reminder: Ensure that the presigned URL expiration time is minimal to reduce
unauthorized access risks.
Bucket Management: Regularly review bucket permissions and presigned URLs to maintain
security.
Use Case: Presigned URLs are ideal for temporarily sharing private files securely.