Connect S3 with EC2

Search for a command to run...

No comments yet. Be the first to comment.
"ddrescue got your data off the dying drive. Now what? This is where you actually get it back." 🚑 The Big Picture First A lot of people think ddrescue restores data. It doesn't — not directly. Here
"Your hard drive is making a clicking sound. Your stomach drops. Don't panic — ddrescue has your back." 🤔 What Even Is ddrescue? Imagine your hard drive is a library. Some books are fine. Some are
Most teams treat SELinux as an obstacle. The teams that thrive in production treat it as a superpower. Here's everything you need to know to move from frustrated to fluent. If you've ever Googled a
Application Load Balancer? A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones. This increases th...

In this Lab you will get the idea of the following: Created an Amazon EC2 launch template Created an Amazon EC2 Auto Scaling launch configuration Configured scaling policies and created auto Scaling group to scale in and scale out the number of se...

Bucket name: must be globally unique
AWS Region: your choice
Object Ownership: ACLs enabled
uncheck Block all public access
Check I acknowledge that the current settings might result in this bucket and the objects within becoming public.
Bucket Versioning: enable (preferred) or disable as your requirement
Create bucket
Click on bucket name and upload the object you want for example any image
While uploading scroll down and open > Permission
Predefined ACLs: Grant public-read access
I understand the risk of granting public-read access to the specified objects.
[ NOTE: if you forget to give ACL public access check object goto ^Action and scroll down and click make public using ACL -> Make public
open bucket -> Check the object and Copy URL
Name: my-server
Key pair: create new key pair
Key pair name: mykeypair
Private key file format: .ppk For PuTTY user .pem For use with OpenSSH
Allow SSH traffic
Allow HTTP traffic from the internet (note you may also enable https )
Launch instance
Connect EC2 using the key you downloaded either by putty or ssh
After connected as ec2-use
]$ pwd
/home/ec2-user
Install Apache server
]$ sudo yum install httpd -y
]$ sudo systemctl status
● ip-172-31-84-163.ec2.internal
State: running
Units: 281 loaded (incl. loaded aliases)
Jobs: 0 queued
Failed: 0 units
Since: Thu 2023-06-01 17:42:25 UTC; 16min ago
systemd: 252.4-1161.amzn2023.0.4
]$ cd /var/www/html
]$ pwd
]$ sudo nano index.html
<img src="https://my-uniue-bucket-1.s3.amazonaws.com/Shared_Responsibility_Model_V2.59d1eccec334b366627e9295b304202faf7b899b.jpg"/>
]$ sudo systemctl start httpd
]$ sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
Active: active (running) since Thu 2023-06-01 18:08:55 UTC; 17s ago
Docs: man:httpd.service(8)
Main PID: 26020 (httpd)
