AWS CLI Flashcards
Always give your users the minimum amount of access required is called …
Least privilege
Assign your users to groups. Your users will automatically inherit the permissions of the group. The groups permissions are assigned using policy documents.
Create Groups
You will see this only once. IF you do not save it, you can delete the key pair and regenerate it. You will need to run AWS configure again.
Secret Access Key
Is it better to create one secret access key per developer or create one key and share it with all developers?
Do not use just one key. Do not create just one access key and share it with all your developers. IF someone leaves the company on bad terms, then you will need to delete the key and create a new one and every developer would then need to update their keys. Instead, create one key pair per developer.
Can you use the AWS CLI on a PC, MAC and Linux?
yes, it works on all 3 OSes.
AWS CLI Pagination
you can control the number of items included in the output whenyou run a CLI command
- by default, the AWS CLI uses a page size of ___
- if you run aws s3api list-objects my_bucket - on a bucket which contains ___objects, the CLI actually makes 3 API calls to S3, but displays the entire output in one go.
100
2500
AWS CLI Pagination - Errors
if you see errors when running list commands on a large number of resources, the default page size of ____ might be too high.
you are most likely to see a “timed out” error, because teh API call has exceeded the max allowed time to fetch the required results
to fix this, use teh ______ option to have the CLI request a smaller number of items from each API call.
the CLI retrieves the full list, but performs a larger number of API calls in teh background and retrieves a ____ number of items with each call.
1000
–page-size
smaller
Fixing AWS CLI Pagination - Errors
aws s3api list-objects -bucket mybucket –page-size ___
use teh _____ option to return fewer items inteh CLI output
aws s3api list-objects –bucket mybucket –max-items ___
100
–max-items
100