Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.83 KB

s3_AWS_CLI.md

File metadata and controls

39 lines (33 loc) · 1.83 KB

S3 and AWS CLI

  • Simple Storage Service
  • shh into machine using AWS key
  • if you couldn't, go to security tab and select security group add port 22, as a new inbound rule

run these comands

  • sudo apt-get update -y
  • sudo apt-get upgrade -y
  • sudo apt update -y
  • sudo apt upgrade -y
  • install pip sudo apt install python3-pip
  • check if you have python3 --version installed
  • Install awscli sudo apt install awscli
  • python3 -m pip install awscli
  • aws configure will prompt AWS Access key ID, add it then ask for more credential info
  • to see the list of s3 content aws s3 ls
  • Create a bucket make it mb aws s3 mb s3://eng99-ali
  • check if your bucket exists aws s3 ls
  • add a file to s3 buket you just created aws s3 cp README.md s3://eng99-ali
  • delete the file rm -rf README.md
  • copy file to local machine aws s3 cp s3://<path_to_file>
  • to remove the s3 bucket run aws s3 rb s3://eng99-ali --force

Using python Boto3