Skip to content

Commit c1d35dd

Browse files
committed
More notes on AWS and social eng.
1 parent 64e48f1 commit c1d35dd

File tree

3 files changed

+112
-12
lines changed

3 files changed

+112
-12
lines changed

aws.txt

+66-10
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,38 @@ Advantages of moving to cloud
1010
Concepts
1111
Each region is an independent set of data centres.
1212

13-
**Availability zones**: interconnected data centres within the same region isolated from failures. They are connected with low latency network.
13+
**Availability zones**: interconnected data centres within the same region isolated from failures. They are connected with low latency network. You can achieve high availability by deploying the data/components in two availability zones within the same region.
1414

1515
**Hybrid deployment**: mix of cloud and on premises.
1616

17-
You can achieve high availability by deploying the data/components in two availability zones within the same region
17+
**Durability**: Probability that you will recover some persisted data in a given time.
18+
**Availability**: Probability that you will access some data, any time in a given time.
19+
20+
5 Pillars for well architected cloud
21+
Operational Excellence
22+
Security
23+
Reliability
24+
Performance Efficiency
25+
Cost Optimization
26+
27+
4 support plans
28+
Basic
29+
Developer
30+
Business
31+
Enterprise
1832

1933
Accessing AWS
2034
Console
2135
Cli
2236
Sdk
2337

38+
SAML authentication flow
39+
Protocol to federate your users to AWS console. The auth flow is:
40+
The authenticated user in client's site triggers the federate functionality.
41+
The portal generates a SAML authentication response that includes assertions and attributes about the user
42+
The client browser is then redirected to the AWS single sign-on endpoint posting the SAML assertion
43+
The AWS console endpoint validates the SAML assertion and generates a redirect to access the management console (suing STS)
44+
The browser follows the redirect which brings into the AWS console as an authenticated user
2445

2546
Services
2647
**Elastic load balancing**: Distributed load across multiple EC2 instances
@@ -63,9 +84,9 @@ Database services
6384

6485
Security and identity services
6586

66-
**Identity and access management (Iam)**: creation of users and groups and use permissions to allow and deny access to their AWS.
87+
**Identity and access management (IAM)**: creation of users and groups and use permissions to allow and deny access to their AWS.
6788

68-
**Key management service (kms)**: creates and controls encryption keys. Integrates with other services to encrypt data.
89+
**Key management service (KMS)**: creates and controls encryption keys. Integrates with other services to encrypt data.
6990

7091
**Directory service**: set up and run Microsoft active directory.
7192

@@ -98,34 +119,68 @@ Simple Storage Service (S3)
98119

99120
Provides REST API with CRUD (create read update delete) operations
100121

101-
You dont have to worry about storage limits or capacity planning or durability. Efficient for frequently accessed data.
122+
You don't have to worry about storage limits or capacity planning or durability. Efficient for frequently accessed data.
102123

103124
Each bucket can hold unlimited objects of up to 5TB and lives in a single region.
104125

105126
Each object is identified with a key and has metadata associated
106127

107-
**Concurrency**: Eventual consistency for updated data and read-after-write for new data.
128+
Format: **https://${BUCKET_NAME}.s3.amazonaws.com/${OBJECT_KEY}**
129+
130+
Can be used to host static websites with **<bucket-name>.s3-website-<AWS-region>.amazonaws.com** You can use Cloudfront as a CDN to make the website fast globally. You can configure redirects
131+
132+
Only the owner of an Amazon S3 bucket can permanently delete a version.
133+
134+
S3 can achieve at least 3,500 PUT/POST/DELETE and 5,500 GET requests per second per prefix in a bucket (you can use random prefixes to increase the throughput in data-intensive applications).
135+
136+
Max object size: 5TB. Min object size: 0bytes, except for S3 IA that has a min size of 128kb. Default maximum number of buckets per region: 100
137+
138+
You can write objects directly to an edge location to reduce latency to some users.
139+
140+
**Concurrency**: Eventual consistency for updated data and read-after-write for new data Updates are atomic: requesting a file immediately after an update will give you either the old data or the new data (no partially updated or corrupted data).
108141

109142
**Access control**: iam policies, query string auth and s3 bucket policies.
110143

111144
You can use prefixes for object hierarchy aggregation.
112145

113-
**Reduce Redundancy Storage (RRS)**: strategy with cheaper price less redundancy
114-
**Infrequent Access (IA)**: strategy with les bandwidth.
146+
**Reduce Redundancy Storage (RRS)**: cheaper strategy (less redundancy).
147+
**Infrequent Access (IA)**: cheaper strategy (less bandwidth).
115148

116149
You can set lifecycle rules: where data is moved to IA or RRS.
117150

118151
Supports versioning if objects.
119152

120153
**MFA delete**: Deleting an object requires an extra token.
121154

122-
**Cross region replication**: async replicate all objects to another region. Good to reduce latency
155+
**Cross region replication (CRR)**: async replicate all objects to another region. Good to reduce latency. Requires src and dst with versioning enabled, correct S3 permissions, and different regions.
123156

124157
You can set up **logging** of requests.
125158

126159
**Events notifications** can be sent after events such as upload. Can be sent to an SQS, SNS, or a lambda.
127160

128161
You can specify world readable, IAM permissions or temporary public URLs that expire.
162+
Durability & Availability table
163+
**Class Durability Availability
164+
STANDARD 99,999999999% 99,99%
165+
STANDARD_IA 99,999999999% 99,9%
166+
ONEZONE_IA 99,999999999% 99,5%
167+
GLACIER 99,999999999% 99,99%*
168+
REDUCED_REDUNDANCY 99,99% 99,99%**
169+
170+
Encryption
171+
**SSE-S3**: fully managed encryption at rest.
172+
**SSE-C**: encryption at rest with custom encryption keys (to be provided together with the uploaded or download the file). The key is not stored by AWS. Use this option if you want to maintain your own encryption keys, but don't want to implement or leverage a client-side encryption library.
173+
**SSE-KMS**: encryption at rest using keys managed through the KMS service. Allows to define fine grained permissions based on the permissions of KMS keys. Best solution for compliance (PCI-DSS, HIPAA, etc.).
174+
175+
Transfer optimizations
176+
**S3 transfer acceleration**: Improves latency.
177+
HTTP multi-part upload to transfer big files.
178+
**Snowball**: For transferring massive amounts of data.
179+
**Storage gateway**: If your storage needs to exist also on premise (hybrid cloud storage).
180+
Storage gateway offers 2 main volume modes:
181+
**Cached volumes**: Stores files in the cloud and keeps a local cache to speed up reads
182+
**Stored volumes**: Optimized for low latency, stores files locally and asynchronously sends back up point-in-time snapshots to S3.
183+
129184

130185
Amazon Glacier
131186
Low-cost storage service, good for long term backups and for infrequently used data storage.
@@ -134,6 +189,8 @@ Amazon Glacier
134189
You can also specify lock policies, such as write once read many (WORM).
135190
You can retrieve 5% of the data for free every month.
136191
Encryption at rest can not be disabled.
192+
Files can be restored through the web console or the S3 API (RestoreRequest action).
193+
137194

138195
Elastic Compute Cloud (EC2)
139196
Resizable compute capacity. Virtual machines are called **instances**.
@@ -206,7 +263,6 @@ Subnets
206263
vpn only.
207264

208265

209-
210266
Route tables
211267
Rules to determine where traffic gets directed
212268

linux.txt

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Searching within files
5858
Search for a pattern in a zip fil
5959
*$ zgrep*
6060

61+
Troubleshoot broken dependencies
62+
Show referenced shared libraries and its resolution
63+
*$ ldd binary*
64+
6165
Others
6266
Import CA in java store
6367
*sudo keytool -import -alias foo -trustcacerts -keystore cacerts -file cacert.der*

socialEngineering.txt

+42-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,48 @@ How to make friends and influence people
5757

5858
Praise every improvement someone does, they will be happy you do so.
5959

60+
61+
The Compound Effect
62+
Have healthy habits, it might take you years to achieve your goals but doing 10 actions a day towards that will help you to achieve it. The opposite for unhealthy habits (TV, fast food, etc..). Have exceptions but get a healthy routine.
63+
**Take ownership of your failures**: no matter what happens to you, take responsibility for it. You are freed by your choices.
64+
65+
**Track actions taken to achieve or to fail a goal**: It helps to focus on the problem and makes you aware of those actions.
66+
67+
Every dollar you spend and not invest is 5-10 dollars you lose in 10 years time.
68+
69+
Replace bad behaviour habits with healthier ones. Identify them first. For example, drink carbonated water instead of cola. Find money you waste every month (Netflix, insurance, Starbucks), does it really give you happiness? Change the habit.
70+
71+
Invest early: Compound effect will make your money grow.
72+
73+
What motivates you is the ignition of your passion. You need to identify what you want to achieve to make a difference this time and not fail like the other ones. The power of why makes you stick to the habits. Otherwise, you will revert to sleepwalking through poor choices
74+
75+
Taking actions that align with your core values will make you happy. If you hang out with people with different values you won’t we happy.
76+
77+
Goals = choice + behaviour(action) + habit(repeat) +compounded(time)
78+
79+
Identify behaviours leading to that goal and the ones blocking you from achieving it. People fit have good gym habits, people thin have good food habits, etc...
80+
81+
Monitor how much time you spend watching tv, reading news etc and change habits. News tend to be negative and depressing, avoid speending too much time on them.
82+
83+
If you tell friends or people about your goals and tracking you are more likely to commit to them due to social pressure
84+
85+
Competition also helps to stick to the habits, get your friends or coworkers to work with you
86+
87+
88+
You are a badass
89+
90+
You need to stop wanting to do something and start doing something about it
91+
92+
And the day come when the risk to remain tight in a bud was more painful than the risk it took to blossom
93+
94+
If you want to live a life you've never lived, you have to do things you've never done.
95+
96+
Most people are living in an illusion based on someone else's beliefs. You have been raised by your family and your thinking is influenced by it, society has many expectations that are not necessarily going to give you happiness.
97+
98+
(not such a good book, gave up on it).
99+
100+
Others
101+
**Lemons market** The buyers know more about the product than the buyer (like used cars), the cheaper product wins.
60102
Things to avoid:
61103
Do not say 'like'
62104
Do not apologize for everything
@@ -65,5 +107,3 @@ How to make friends and influence people
65107
Do not talk too loud
66108
Do not interrupt people
67109
No nail biting
68-
69-
**Lemons market** The buyers know more about the product than the buyer (like used cars), the cheaper product wins.

0 commit comments

Comments
 (0)