How to use AWS CLI

Hackbydoing Academy tool guide · Cloud, virtual machines & scripting · free, no login

What AWS CLI is, in plain words

The Amazon Web Services command line: it lets you inspect and change cloud storage buckets (the 's3' and 's3api' parts) by typing commands instead of clicking a website.

A working aws command

aws s3 ls s3://northwind-public --no-sign-request

Lists what is inside the northwind-public storage bucket without logging in, which only works if the bucket is open to the public.

Every piece of the command, explained

--aclUsed when setting who may access a bucket; the next piece is either a ready-made setting like 'public-read' or the detailed access list.
--bucketThe next piece is the name of the storage bucket the command should act on.
--bucket-logging-statusThe next piece is the logging settings document (in JSON) that says whether access logs are kept for the bucket and where they go.
--expires-inThe next piece is a number of seconds; for a pre-signed link it says how long that temporary download link stays valid, for example 900 means 15 minutes.
--no-sign-requestDo not attach your login credentials to the request; you go in as an anonymous stranger, which is exactly how you test whether a bucket is wrongly public.
--outputThe next piece says how results should be printed, for example 'json' for the tidy machine-readable format.
--policyThe next piece is the bucket's policy document (written in JSON, a structured text format) that states the access rules to apply.
--public-access-block-configurationThe next piece is the set of four true/false switches (in JSON) that block every kind of public access to the bucket.

Use it the legal way

Only run aws on systems you own or have explicit, written permission to test — at work that means a signed engagement, at home that means your own lab. Inside Hackbydoing Academy you practice on simulated networks and lab machines built for exactly this, where breaking things is the lesson and no one else's systems are involved. Learning how a tool works also teaches you what it looks like from the defender's chair: the logs it leaves, the traffic it makes, and the settings that shut it down.

✦ Practice AWS CLI hands-on in a guided lab

Reading about aws is step one. In the Academy you run it yourself, step by step, in guided labs on simulated networks — 185 rooms covering attack and defense, from your first scan to full operations, with a defender's debrief at the end of every room. Founding membership is $9.99/mo for the first 500 members.

Join Hackbydoing Academy →

Related tool guides

Free from the Hackbydoing Academy — learn cybersecurity by doing: real tools, guided labs, attack and defense, on simulated networks. More free material: Tool Guides index · Free Downloads Library · Hackbydoing Academy · Print this page (Ctrl/Cmd+P) for a clean paper copy.