1. You launched an EC2 instance to host a NodeJS application. After installing all the necessary software and configuring the application, you recorded the public IPv4 address of the EC2 instance for access. Then, you stopped the instance and restarted it to complete the application setup. However, after restarting, you were unable to access the EC2 instance and noticed that its public IPv4 addr..
My Tech Blog (Coding/AWS)
1. Placement Groupsโถ Sometimes you want to control over the EC2 Instance placement strategyโถ That strategy can be defined using placement groupsโถ When you create a placement group, you specify one of the following strategies for the group: - Cluster: clusters instances into a low-latency group in a single Availability Zone - Spread: spreads instances across underlying hardware (max 7 instances..
1. Private vs Public IP (IPv4)โถ Networking has two sorts of IPs. IPv4 and IPv6: - IPv4 : 1.160.10.240 - IPv6: 3ffe: 1900:4545:3:200:f8ff:fe21:67cf โถ AWS supports IPv4 and IPv6 bothโถ IPv4 is still the most common format used online.โถ IPv6 is newer and solves problems for the Internet of Things (IoT).โถ IPv4 allows for 3.7 billion different addresses in the public space.โถ IPv4: [0-255].[0-255].[0-2..
Stop Instance vs Reboot Instance? 1๏ธโฃ Stop Instance (์ ์ง)โถ ์ธ์คํด์ค๋ฅผ ์์ ํ ์ข
๋ฃ(Shut down)ํ๋ค๊ฐ ๋ค์ ์์ํ๊ฒ ๋จโถ CPU, RAM ๋ฑ์ ๋ฆฌ์์ค๊ฐ ํด์ ๋จ(ํ ๋น ํด์ ) → ๊ณผ๊ธ์ด ์ค๋จ๋๊ฑฐ๋ ์ค์ด๋ค ์ ์์โถ ๋ค์ ์์ํ๋ฉด ์๋ก์ด ํธ์คํธ์์ ๋ถํ
๋ ์๋ ์์โถ EBS(Elastic Block Store) ๋ณผ๋ฅจ์ ์ ์ฅ๋ ๋ฐ์ดํฐ๋ ์ ์ง๋จโถ ํผ๋ธ๋ฆญ IP๋ ๋ณ๊ฒฝ๋ ์ ์์ (ํ๋ ฅ์ IP ํ ๋น ์ ์ ์ง ๊ฐ๋ฅ)โถ ์) "AWS EC2 ์ธ์คํด์ค๋ฅผ ๋ฐค์๋ ๋๊ณ , ๋ฎ์ ๋ค์ ์ผ์ ๋น์ฉ ์ ๊ฐํ๊ธฐ" 2๏ธโฃ Reboot Instance (์ฌ๋ถํ
)โถ ์ธ์คํด์ค๋ฅผ ๋ค์ ์์ํ๋ ๊ฒ(Windows์์ ‘์ฌ๋ถํ
’๊ณผ ์ ์ฌ)โถ CPU, RAM ๋ฑ ๋ฆฌ์์ค๋ ์ ์ง๋จ → ๊ณผ๊ธ ์ง์๋จโถ ์ธ์คํด..
[AWS] ๐ก SSH ์ฐ๊ฒฐ ์ The authenticity of host 'IP์ฃผ์' can't be established. IP ์ถฉ๋ ์๋ฌ
โ ๏ธ ๋ฌธ์ AWS์์ ์ธ์คํดํธ๋ฅผ ์ฌ์์ํ ํ SSH๋ฅผ ์๋ํ์ผ๋ ์๋์ ๊ฐ์ ๊ฒฝ๊ณ ๊ฐ ๋จ๋ ํ์ssh -i "your-key.pem" ec2-user@your-ec2-public-ip ๐ง ์์ธ์ธ์คํด์ค๋ฅผ ์ค์งํ ํ ์ฌ์์ํ๋ฉด ๊ณต์ฉIP ์ฃผ์๊ฐ ๋ณ๊ฒฝ๋๋ค. SSH๊ฐ ์๋ก์ด ํธ์คํธ(๊ณต์ฉ IP)๋ก ์ฐ๊ฒฐํ๋ ค๊ณ ํ์ง๋ง, ๊ธฐ์กด known_hosts ํ์ผ์ ๊ธฐ์กด์ IP(54.66.147.18)๊ฐ ์ ์ฅ๋์ด ์์ด์ ์ถฉ๋ํ๋ ์ํฉ์ผ๋ก ์ถ์ ๋จ. ๐ก ํด๊ฒฐ๋ฒ๊ทธ๋ฅ yes๋ง ์
๋ ฅํ๊ณ ์ํฐ์น๋ฉด ๋๋ค.๋ง์ฝ Are you sure you want to continue connecting? ์ด ๋จ์ง ์์ผ๋ฉด ์๋ ๋งค๋ด์ผ๋๋ก ๋จผ์ ์ถฉ๋ํ๋ IP ํค๋ฅผ ์ญ์ ํ๊ณ ์ฌ์๋ ํด์ผ ํ๋ค. โผ โ
๏ธ ๊ธฐ์กด known_hosts์์ ์ถฉ๋ํ๋ ํญ๋ชฉ ์ญ์ ํ๊ธฐPow..
1. Which of the following EC2 purchasing options offers the highest discount but is not suitable for databases or critical workloads?์ง๋ฌธ 1. ๋ค์ ์ค, ํ ์ธ ํญ์ด ๊ฐ์ฅ ํฌ๋, ๋ฐ์ดํฐ๋ฒ ์ด์ค ํน์ ์ค์ ์
๋ฌด์๋ ์ ํฉํ์ง ์์ EC2 ๊ตฌ๋งค ์ต์
์ ๋ฌด์์ธ๊ฐ์? โ๏ธ 1) Spot Instances (์คํ ์ธ์คํด์ค)โ 2) On-demand (์จ๋๋งจ๋)โ 3) Dedicated Hosts (์ ์ฉ ํธ์คํธ)โ 4) Reserved Instances (์์ฝ ์ธ์คํด์ค)Spot Instances are suitable for short-term workloads and are the most cost-effecti..
EC2 ์ธ์คํด์ค๋ฅผ ์คํํ ์ ์๋ ๋ชจ๋ ๋ฐฉ๋ฒ1. Spot request1-1.How to check Pricing historyEC2 Dashboard > [Spot requests] > [Pricing history] ์์ EC2 Instance์ ์ต๊ทผ ์๊ธ ๋ด์ญ ํ์ธ ๊ฐ๋ฅ ๊ทธ๋ํ์์ ๊ฒ์์ ์ ์ด On-demand ๊ฐ๊ฒฉ 1-2. How to request Spot Instance?EC2 Dashboard > [Spot requests] > [Request spot Instance] ๐ฉ Launch parameters (์ธ์คํด์ค๋ฅผ ์์ํ ๋ ์ค์ ํ๋ ๋ฐฉ์)- Manually configure launch parameters- Use a launch template โถ Manually configur..
1. EC2 Spot Instance Request โถ Can get a discount up to 90% compared to On-demandโถ Define max spot price and get the instance while current spot price - ์ธ์คํด์ค์ ์คํ ๊ฐ๊ฒฉ์ด ์ฐ๋ฆฌ๊ฐ ์ง๋ถํ๊ณ ์ ํ๋ ์ต๋ ๊ฐ๊ฒฉ๋ณด๋ค ๋ฎ๋ค๋ฉด ํด๋น ์ธ์คํด์ค ์ ์งโถ The hourly spot price varies based on offer and capacity. - ์๊ฐ๋น ์คํ์ ์คํผ๋ ์ฉ๋์ ๋ฐ๋ผ ๋ค๋ฅด๋ค. โญ If the current spot price > your max price you can choose to stop or terminate your instance with a 2 minute..