generated from ExamProCo/aws-bootcamp-cruddur-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfo×.txt
142 lines (103 loc) · 4.03 KB
/
Info×.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Account Alias
aws-krts-47
User name/IAM
KRTS_47
Console password
ocJ4$$^A
f8*mH49_K;ky.UXW
https://www.youtube.com/watch?v=zA8guDqfv40&t=42567s
Notes for the AWS Cloud complete bootcamp
around 3:00:00 - setting the env thru git pod, github, aws
3:44:30 - setting billing alarm
4:14:00 tags?
12:02:00 - Asking for questions in discord the correct way
Week3
19:15:33 Cognito - decentralised authentication - Integrate it into a backend application with custom login pages
the way a real company would accually want to use it - week03
User pool- when you are making a web app and have log in and sign up
and have that managed externally
20:10:41 - User pool ID
- in dockker-compose.yml
AWS_COGNITO_USER_POOL_ID: -from User pools
AWS_COGNITO_USER_POOL_CLINET_ID: -from App clients and analytics
20:17:00 HomefeedPage.js from frontend
import {Auth} from 'aws-amplify'
const [user, setUser] = React.useState(null);
......
checkAuth();
!!! To make USER Pool ID manually:
# First command - Create user pool
aws cognito-idp create-user-pool --pool-name "MyUserPool"
# Wait a moment to get the pool ID after creation
aws cognito-idp list-user-pools --max-results 10
# Second command - Create client (once you have the pool ID)
aws cognito-idp create-user-pool-client \
--user-pool-id eu-north-1_tpn4XlV1R \
--client-name "MyAppClient" \
--no-generate-secret \
--explicit-auth-flows "ALLOW_USER_SRP_AUTH" "ALLOW_REFRESH_TOKEN_AUTH" \
--supported-identity-providers "COGNITO" \
--callback-urls '["http://localhost:3000/callback"]' \
--logout-urls '["http://localhost:3000"]'
If you want to run this as a single line (which often works better in command line), here it is:
aws cognito-idp create-
20:33:40
Debugging skills ;)
- View logs
- Attach to shell -> env -> verify the env variables
23:22:00 Improved UI
Week 4 — Postgres and RDS
1:00:20:00 Provision RDS Instance
aws rds create-db-instance \
--db-instance-identifier cruddur-db-instance \
--db-instance-class db.t3.micro \
--engine postgres \
--engine-version 16.3 \
--master-username root \
--master-user-password huEE33z2Qvl383 \
--allocated-storage 20 \
--availability-zone eu-north-1a \
--backup-retention-period 0 \
--port 5432 \
--no-multi-az \
--db-name cruddur \
--storage-type gp2 \
--publicly-accessible \
--storage-encrypted \
--enable-performance-insights \
--performance-insights-retention-period 7 \
--no-deletion-protection
1:01:27:50 give permission to a file to execute:
-#! /usr/bin/bash -make it a bash execute file -
-ls -l to show the state of the files
-chmod u+x(or+x) and the name of the file to become executable
1:01:31:00 Cannot drop the curently open database - we are connected to it
man sed - tool used to manipulate text in place
bin/db-drop
#! /usr/bin/bash
NO_DB_CONNECTION_URL=$(sed 's/\/cruddur//g' <<<"$CONNECTION_URL")
psql $NO_DB_CONNECTION_URL -c "DROP database cruddur;"
Replaces /cruddur with nothing in psql postgresql://postgres:password@127.0.0.1:5432/cruddur
's/\/cruddur//g' - sed 's/what to select/what to replaceit with//g-globally'
-\ the backslash is to isolate / in /cruddur
1:03:31:00
Create a Lambda
1:03:41:00
MAking a new layer for postgreql libraries
Lambda - layer - arn:aws:lambda:eu-north-1:730335305336:function:cruddur-post-confirmation-2
1:03:44:00
Add trigger to lambda
posibil sa trebuiasca sa fac un layer pt postgress pt ca-north
1:04:01:30
Create VPC - Create/Attach a new policy for EC2 allow
ramas la https://youtu.be/zA8guDqfv40?t=101147
1:04:05 ?
turn on the database in aws.
-mai bine ma uit in reverse. schimba mult cod degeaba.
am dat skip de la 1:05:15 pana la 1:06:16:47
Week 5 - DynamoDB and Serverless Caching -1:06:24:00
AWS SCP Best Practices - https://github.com/hashishrajan/aws-scp-best-practice-policies
Cloud-security-vulnerabilities - https://github.com/hashishrajan/cloud-security-vulnerabilities
# List tables - aws dynamodb list-tables
https://docs.aws.amazon.com/cli/latest/reference/dynamodb/list-tables.html?highlight=list%20tables
-ramas la 1:09:10:00