๋ฐ˜์‘ํ˜•

๐Ÿ“‚ AWS 38

[AWS] AWS Python SDK Boto3 ์„ค์น˜ ๋ฐ ์‚ฌ์šฉ๋ฒ•

Boto3๋ž€?Boto3๋Š” Python์šฉ AWS SDK๋กœ Botocore(Python SDK์™€ CLI ์‚ฌ์ด์˜ ๊ณต์œ ๋˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ), Boto3(Python SDK ๊ตฌํ˜„ ํŒจํ‚ค์ง€) ๋‘๊ฐ€์ง€ ์ฃผ์š” ํŒจํ‚ค์ง€๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. (AWS CLI๋Š” Botocore๋กœ ๊ตฌํ˜„๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.)AWS SDK๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด AWS ์„œ๋น„์Šค๋“ค์— ๋Œ€ํ•œ ๊ฐ์ฒด์ง€ํ–ฅ(object-oriented) API ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์ €์ˆ˜์ค€์˜ ์ ‘๊ทผ(low-level access)์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.Boto3 SDK Featuresclient : AWS ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์ €์ˆ˜์ค€์˜ ์ธํ„ฐํŽ˜์ด์Šค(a low-level interface)๋ฅผ ์ œ๊ณตํ•˜๊ณ  ์„œ๋น„์Šค API์™€ 1:1์— ๊ฐ€๊น๊ฒŒ ๋งคํ•‘resource : AWS ์„œ๋น„์Šค์— ๋Œ€ํ•œ ๊ฐ์ฒด ์ง€ํ–ฅ ์ธํ„ฐํŽ˜์ด์Šค(an object-oriented ..

๐Ÿ“‚ AWS 2022.05.24

[AWS] CodeBuild

CodeBuild์ด๋ž€?CodeBuild๋Š” ์†Œ์Šค์ฝ”๋“œ๋ฅผ ์ปดํŒŒ์ผํ•˜๊ณ  ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ํŒจํ‚ค์ง€๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๋Š” ์™„์ „ ๊ด€๋ฆฌํ˜• ๋นŒ๋“œ ์„œ๋น„์Šค๋กœ ๋Œ€ํ‘œ์ ์ธ CI(Continuous Integration) ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค.CodeBuild๋Š” ๋นŒ๋“œ ์š”์ฒญ์ด ์ƒ์„ฑ๋˜๋ฉด ์ฆ‰์‹œ ๋นŒ๋“œ๊ฐ€ ์‹œ์ž‘๋˜๊ณ , ๋นŒ๋“œ ๋ณผ๋ฅจ์— ๋”ฐ๋ผ ์ธํ”„๋ผ๊ฐ€ ์ž๋™์œผ๋กœ ํ™•์žฅ/์ถ•์†Œ๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.CodeBuild์˜ ํŠน์ง•๋นŒ๋“œ ํ”„๋กœ์ ํŠธ(build project)๋Š” ๋นŒ๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ •์˜ํ•œ ๊ฒƒ์ด๋ฉฐ ์†Œ์Šค์ฝ”๋“œ ์œ„์น˜, ๋นŒ๋“œ ํ™˜๊ฒฝ, ์‹คํ–‰ํ•  ๋นŒ๋“œ ๋ช…๋ น, ๋นŒ๋“œ ์ถœ๋ ฅ๋ฌผ์˜ ์ €์žฅ ์œ„์น˜๋“ฑ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.๋นŒ๋“œ ์•„ํ‹ฐํŒฉํŠธ(build artifacts)๋Š” ๋นŒ๋“œ์— ์˜ํ•ด ์ƒ์„ฑ๋œ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ๋ฐฐํฌ ํŒจํ‚ค์ง€, WAR ํŒŒ์ผ, ๋กœ๊ทธํŒŒ์ผ ๋“ฑ์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.๋นŒ๋“œ ํ™˜๊ฒฝ(build environment)์€ ์šด..

๐Ÿ“‚ AWS 2022.04.27

[AWS] CodeCommit

CodeCommit์ด๋ž€?Git ๊ธฐ๋ฐ˜์˜ ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์„œ๋น„์Šค๋กœ ์†Œ์Šค๋ฅผ ์ €์žฅํ•˜๊ณ  ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋ฉฐ ๊ธฐ์กด Git ๋„๊ตฌ์™€ ์—ฐ๋™ ๊ฐ€๋Šฅํ•œ ์™„์ „ ๊ด€๋ฆฌํ˜• ์†Œ์Šค ์ œ์–ด ์„œ๋น„์ŠคCodeCommit์˜ ํŠน์ง•๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋Š” Key Management Service(KMS)์„ ํ†ตํ•ด ์ž๋™์œผ๋กœ ์•”ํ˜ธํ™”๋˜๊ณ , ์ฒซ๋ฒˆ์งธ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๋ฉด AWS๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” CodeCommit ํ‚ค๊ฐ€ ์ž๋™์œผ๋กœ ์ƒ์„ฑ๋œ๋‹ค.IAM, CloudTrail, CloudWatch์™€ ์—ฐ๋™ํ•˜์—ฌ ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ ‘๊ทผ์„ ์ œ์–ดํ•˜๊ฑฐ๋‚˜ ๋ชจ๋‹ˆํ„ฐ๋ง ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.CodeCommit์€ resoure-level permissions(๋ฆฌ์†Œ์Šค ์ˆ˜์ค€ ๊ถŒํ•œ)์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด git pull, git push๋“ฑ์˜ ์ž‘์—…์— ๋Œ€ํ•ด ์ œ์–ด๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ์ž‘์—…์— ๋Œ€ํ•ด MFA๋ฅผ ..

๐Ÿ“‚ AWS 2022.04.12

[AWS/CLI] describe-security-groups

Describes the specified security groups or all of your security groups.๋ชจ๋“  ๋ณด์•ˆ๊ทธ๋ฃน ์ƒ์„ธ์ •๋ณด ์กฐํšŒ aws ec2 describe-security-groups --profile {PROFILE_NAME}vpc-id๋กœ ํ•„ํ„ฐ๋ง aws ec2 describe-security-groups --profile {PROFILE_NAME} \ --filters "Name=vpc-id, Values=vpc-00000000000000000"VPC๋ณ„ ๋ณด์•ˆ๊ทธ๋ฃน์—์„œ SSH(TCP 22) ๋ฃฐ์ด ์žˆ๋Š” ๋ณด์•ˆ๊ทธ๋ฃน ์กฐํšŒ aws ec2 describe-security-groups --profile {PROFILE_NAME} \ --filters "Name=vpc-id, Va..

๐Ÿ“‚ AWS 2021.11.15

[AWS/CLI] start-instances / stop-instances

start-instances๊ธฐ์กด์— ์ค‘์ง€๋˜์–ด ์žˆ๋Š” EBS๊ธฐ๋ฐ˜์˜ ์ธ์Šคํ„ด์Šค ์‹œ์ž‘ aws ec2 start-instances --profile {PROFILE_NAME} \ --instance-ids {INSTANCE_ID}stop-instancesEBS๊ธฐ๋ฐ˜์˜ ์ธ์Šคํ„ด์Šค ์ค‘์ง€ aws ec2 stop-instances --profile {PROFILE_NAME} \ --instance-ids {INSTANCE_ID}์ฐธ๊ณ stop-instances - AWS CLI 1.21.4 Command Referencestart-instances - AWS CLI 1.21.4 Command Reference

๐Ÿ“‚ AWS 2021.10.27

[AWS/CLI] create-route

Creates a route in a route table within a VPC.VPC ๋‚ด์˜ ๋ผ์šฐํŒ… ํ…Œ์ด๋ธ”์— ๋ผ์šฐํŒ…์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.๋ผ์šฐํŒ… ๋Œ€์ƒ์œผ๋กœ ์•„๋ž˜์˜ ๋Œ€์ƒ ์ค‘ 1๊ฐœ๋ฅผ ์ง€์ •ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.Internet GatewayVirtual Private WatewayTransit GatewayNAT GatewayNAT instanceVPC Peering ConnectionNetwork InterfaceEgress-only Internet Gateway๋ผ์šฐํŒ… ๊ฒฝ๋กœ๊ฐ€ ๊ฒฐ์ •๋˜๋Š” ๋ฐฉ๋ฒ•๋ผ์šฐํŒ… ๊ฒฝ๋กœ๋Š” ๊ฐ€์žฅ ๊ตฌ์ฒด์ ์ธ ๊ฒฝ๋กœ๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.์˜ˆ๋ฅผ ๋“ค์–ด 192.0.2.3์— ๋Œ€ํ•˜์—ฌ ๋ผ์šฐํŒ… ๊ฒฝ๋กœ๋ฅผ ๊ฒฐ์ •ํ•˜๋Š”๋ฐ 1)192.0.2.0/24์™€ 2)192.0.0.2.0/28์ด ์žˆ๋‹ค๋ฉด 2)๊ฐ€ ๋” ์ ์€ IP ์ฃผ์†Œ ๋Œ€์—ญ์„ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฏ€๋กœ ๋” ๊ตฌ์ฒด์ ์ด๋ผ๊ณ  ํ• ..

๐Ÿ“‚ AWS 2021.10.27

[AWS/CLI] authorize-security-group-ingress

Adds the specified inbound (ingress) rules to a security group.๋ณด์•ˆ ๊ทธ๋ฃน์— ์ง€์ •ํ•œ ์ธ๋ฐ”์šด๋“œ๋ฃฐ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.์ถœ๋ฐœ์ง€๊ฐ€ 172.16.1.0/24์ธ SSH(TCP 22) ํŠธ๋ž˜ํ”ฝ ํ—ˆ์šฉํ•˜๋Š” ์ธ๋ฐ”์šด๋“œ ๋ฃฐ์„ ์ถ”๊ฐ€ํ•œ๋‹ค. aws ec2 authorize-security-group-ingress \ --profile {PROFILE_NAME} \ --group-id {Security-Group-ID} \ --protocol tcp --port 22 --cidr 172.16.1.0/24์ถœ๋ฐœ์ง€๊ฐ€ 172.16.2.0/24์ธ ICMP ํŠธ๋ž˜ํ”ฝ์„ ํ—ˆ์šฉํ•˜๋Š” ์ธ๋ฐ”์šด๋“œ ๋ฃฐ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.-1์€ ๋ชจ๋“  ICMP ์œ ํ˜•์— ๋Œ€ํ•œ ICMP ์ฝ”๋“œ๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. aws ec2 authorize-se..

๐Ÿ“‚ AWS 2021.10.20

[AWS] Backup

AWS BackupAWS Backup์€ ํด๋ผ์šฐ๋“œ์—์„œ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์˜จํ”„๋ ˆ๋ฏธ์Šค์—์„œ๋„ AWS ์„œ๋น„์Šค ์ „๋ฐ˜์— ๊ฑธ์นœ ๋ฐ์ดํ„ฐ ๋ฐฑ์—…์„ ์‰ฝ๊ฒŒ ์ค‘์•™ ์ง‘์ค‘ํ™”ํ•˜๊ณ  ์ž๋™ํ™”ํ•  ์ˆ˜ ์žˆ๋Š” ์ข…ํ•ฉ ๊ด€๋ฆฌํ˜• ๋ฐฑ์—… ์„œ๋น„์Šค ์ž…๋‹ˆ๋‹ค.AWS Backup ๊ฐœ์š”Centralized backup managementAWS Backup์„ ์‚ฌ์šฉํ•˜๋ฉด ๋ฐฑ์—… ์š”๊ตฌ์‚ฌํ•ญ(backup requirements)์„ ์ถฉ์กฑํ•˜๋Š” ๋ฐฑ์—… ์ •์ฑ…(backup policies)์„ ์ค‘์•™์—์„œ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.AWS Backup์€ ์ค‘์•™ ์ง‘์ค‘์‹ ๋ฐฑ์—… ์ฝ˜์†”(a centralized backup console), ๋ฐฑ์—… API(a set of backup APIs), AWS CLI๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.Policy-based backup๋ฐฑ์—… ๊ณ„ํš(Backup Plan)์€ ๋ฐฑ์—… ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ •์˜(def..

๐Ÿ“‚ AWS 2021.10.20

[AWS] RDS

AWS RDS(Relational Database Service)Amazon Relational Database Service๋Š” ํด๋ผ์šฐ๋“œ์—์„œ ๊ด€๊ณ„ํ˜• ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‰ฝ๊ฒŒ ์„ค์น˜, ์šด์˜ ๋ฐ ํ™•์žฅ ํ•  ์ˆ˜ ์žˆ๋Š” ๊ด€๋ฆฌํ˜• ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค.RDS์˜ ํŠน์ง•RDS๋Š” ํ•„์š”์— ๋”ฐ๋ผ CPU, ๋ฉ”๋ชจ๋ฆฌ, ์Šคํ† ๋ฆฌ์ง€, IOPS๋ฅผ ๊ฐ๊ฐ ๋…๋ฆฝ์ ์œผ๋กœ ํ™•์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.RDS๋Š” ๋ฐฑ์—…, ์†Œํ”„ํŠธ์›จ์–ด ํŒจ์น˜, ์ž๋™ ์žฅ์•  ๊ฐ์ง€ ๋ฐ ๋ณต๊ตฌ๋ฅผ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.DB ์ธ์Šคํ„ด์Šค์— ๋Œ€ํ•œ shell์„ ์ œ๊ณตํ•˜์ง€ ์•Š๊ณ , OS ์ œ์–ด๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.RDS DB ์ธ์Šคํ„ด์Šค์— ๋Œ€ํ•ด Storage Auto Scaling์„ ํ™œ์„ฑํ™” ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.A..

๐Ÿ“‚ AWS 2021.10.15

[AWS] IAM

IAMIAM(Identity & Access Management) ๋Š” AWS ๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•œ ์•ก์„ธ์Šค๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. IAM์€ ์‚ฌ์šฉ์ž ๋ฐ ๊ทธ๋ฃน์„ ๋งŒ๋“ค๊ณ  ๊ด€๋ฆฌํ•˜๋ฉฐ ๊ถŒํ•œ์„ ํ†ตํ•ด ์•ก์„ธ์Šค๋ฅผ ์ œ์–ดํ•ฉ๋‹ˆ๋‹ค.IAM Identities (users, user groups, and roles)IAM User(์‚ฌ์šฉ์ž)User๋Š” AWS ์„œ๋น„์Šค์— ์•ก์„ธ์Šค๊ฐ€ ํ•„์š”ํ•œ ๊ฐœ์ธ ๋˜๋Š” ์‹œ์Šคํ…œ, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.AWS ์„œ๋น„์Šค ๋ฐ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ธ์‹ํ•˜๋Š” ๊ณ ์œ ํ•œ ID์ž…๋‹ˆ๋‹ค. (Linux, Windows์˜ ๊ณ„์ •๊ณผ ์œ ์‚ฌํ•ฉ๋‹ˆ๋‹ค.)User๋Š” ์ด๋ฆ„(name)๊ณผ ์ž๊ฒฉ์ฆ๋ช…(credentials)์œผ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.๊ด€๋ฆฌ์ž ๊ถŒํ•œ(administrator permissions)์ด ์žˆ๋Š” IAM User์™€ AWS account root..

๐Ÿ“‚ AWS 2021.10.13
๋ฐ˜์‘ํ˜•