Login into your root account or an IAM account with full administrative right, then search IAM dashboard.
Click the users, then click Create user button
Choose I want to create an IAM user
Attach 2 permssion to the account: AmazonEC2FullAccess and AmazonS3FullAccess
Review account info before creation
Save your password for later use
Generate access key for later EC2 SSH connection. Open the newly create account info
Download .csv and save for later use

Then login to your newly create IAM account.

Open the S3 panel, click the Create bucket button.
Type the bucket name and choose General Purpose bucket option, keep the ACLs option as default.
Uncheck the Block all public access checkbox and check I acknowledge the current settings might result in this bucket and the objects within becoming public in the warning box.
Keep all other options as default and click Create bucket.

Open the VPC dashboard, click the Security Groups tab on the left navigation bar.
Click Create security group.
Type the security group name and description, choose the VPC network that this security group applies to.
Setting inbound rules and outbound rules as images below
Click Create security group

Open the EC2 panels, click Create instance button.
Type the instance name, choose Amazon Linux 2023 as Operating System and choose the Instance Type.
This project uses FFMPEG to generate HLS Master Playlist to provide multiple resolution, bitrate options for Adaptive Streaming. Since the command for HLS Master Playlist generation consumes large amount of RAM, an instance type with at least 4GB of RAM is recommended. Otherwise, please follow swap memory add-in step in the later section to avoid the ffmpeg command getting SIGKILL signal for RAM overflow.
Click Create keypair and download for later SSH login session.
Choose the newly created keypair for authentication.
Choose the security group created in the previous section.
Configure the storage, 4GB will be used as swap memory in later section and multiple package will be installed: FFMPEG, s3fs, fuse, nvm, node. So 24GB of storage is configured for this instance.
Recheck the instance info, then click Launch instance.
