

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
Cloud security is a giant can of worms. This isn't a security course, but I do want to give you a few pointers to keep you safe with a simple setup while using S3. A few things to think about:
At the moment, in your Tubely app:
While it's great that an attacker would need to steal your AWS credentials to be able to maliciously change the contents of your bucket, relying only on the secrecy of keys is often not enough.
Keys and passwords are compromised all the time.
One way to add an additional layer of security is to ensure that your keys can only be used from certain (virtual) locations. Then an attacker would need your keys and to be on your network to gain access.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "*",
"Resource": "*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "0.0.0.0/32"
}
}
}
]
}
aws s3 cp <local_file_path> s3://<bucket_name>
You should get denied because your IP address is not allowed (your address isn't 0.0.0.0)
Run and submit the CLI tests.
Your IP address can change, e.g. from switching networks or dynamic IP addresses. Whenever that happens, you'll need to update the policy.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run 638b857a-4020-4994-9c57-fde6937d0af0
Submit
bootdev run 638b857a-4020-4994-9c57-fde6937d0af0 -s
To run and submit the tests for this lesson, you must have an active Boot.dev membership
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.