Neil

Neil

22 posts published

๐Ÿ“ Seoul, Korea
Chrome์—์„œ HTTPS ๊ฑธ๋ฆฐ ๋กœ์ปฌํ˜ธ์ŠคํŠธ (localhost) ๋กœ๊ทธ์ธํ•˜๊ธฐ
Tips

Chrome์—์„œ HTTPS ๊ฑธ๋ฆฐ ๋กœ์ปฌํ˜ธ์ŠคํŠธ (localhost) ๋กœ๊ทธ์ธํ•˜๊ธฐ

chrome://flags/#allow-insecure-localhostํฌ๋กฌ URL์— ์œ„ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ํ™”๋ฉด์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. "Allow invalid certificates for resources loaded from localhost." ๋ฉ”๋‰ด๋ฅผ "Enabled" ์ฒ˜๋ฆฌํ•œ๋‹ค. ๋. inlets ๊ณ„์ • ๋งŒ๋“ค ๋ป” ํ•˜๋‹ค๊ฐ€ ๋ˆ ๊ตณ์—ˆ๋‹ค! ><

Terraform ์œผ๋กœ aws lambda & function url ๋งŒ๋“ค๊ธฐ (๋‹จ์ผ ๋žŒ๋‹ค ํ•จ์ˆ˜์— API GW ์—†์ด URL ๋ถ™์ด๊ธฐ)
AWS

Terraform ์œผ๋กœ aws lambda & function url ๋งŒ๋“ค๊ธฐ (๋‹จ์ผ ๋žŒ๋‹ค ํ•จ์ˆ˜์— API GW ์—†์ด URL ๋ถ™์ด๊ธฐ)

Announcing AWS Lambda Function URLs: Built-in HTTPS Endpoints for Single-Function Microservices | Amazon Web ServicesOrganizations are adopting microservices architectures to build resilient and scalable applications using AWS Lambda. These applications are composed of multiple serverless functions that implement the business logic. Each function is mapped to API endpoints, methods, and resources

terraform ์—์„œ aws IAM policy ๊น”๋”ํ•˜๊ฒŒ templatefile๋กœ ๋ง์•„๋„ฃ๊ธฐ!
terraform

terraform ์—์„œ aws IAM policy ๊น”๋”ํ•˜๊ฒŒ templatefile๋กœ ๋ง์•„๋„ฃ๊ธฐ!

templatefile() ํ•จ์ˆ˜ ์“ฐ๊ธฐtemplatefile - Functions - Configuration Language | Terraform by HashiCorpThe templatefile function reads the file at the given path and renders itscontent as a template.Terraform by HashiCorpTerraform 0.12 ๋ถ€ํ„ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” templatefile() ์„ ์“ฐ๋ฉด IAM์„ ์ž˜ ๋ง์•„ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์›๋ž˜๋Š” ํ…Œ๋ผํผ ์ฝ”๋“œ์— EOF ๋ฅผ ์“ฐ๋ฉฐ

AES-256-GCM ์œผ๋กœ ์•”ํ˜ธํ™”๋œ ๊ฐœ์ธ์ •๋ณด Java๋กœ ๋ณตํ˜ธํ™”ํ•˜๊ธฐ
Java

AES-256-GCM ์œผ๋กœ ์•”ํ˜ธํ™”๋œ ๊ฐœ์ธ์ •๋ณด Java๋กœ ๋ณตํ˜ธํ™”ํ•˜๊ธฐ

django ์„œ๋ฒ„์˜ ๊ฐœ์ธ์ •๋ณด๋ฅผ AES-256-GCM ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ์•”ํ˜ธํ™”ํ•˜๊ธฐ์ด๋ฒˆ ์ž‘์—…์€...์„ฑ๋Šฅ์ด ๋งค์šฐ ๋‚ฎ์€ ๋ ˆ๊ฑฐ์‹œ๋ฅผ ์ณ๋‚ด๋Š” ์ž‘์—…์ด์—ˆ๋‹ค. ์ด๋ฒˆ ์ž‘์—…์˜ ์š”๊ตฌ์‚ฌํ•ญ์€ ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์˜ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์„ฑ๋Šฅ์ด ๊ธฐ์กด๋ณด๋‹ค ๋นจ๋ผ์•ผ ํ•  ๊ฒƒ aws KMS๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ๋„คํŠธ์›Œํฌ๋ฅผ ํƒ€์•ผํ•˜๋‹ค๋ณด๋‹ˆ ์•”ํ˜ธํ™”๊ฐ€ ๋Š๋ ธ๋‹ค. ๊ฐœ์ธ์ •๋ณด๋ฅผ ์•”ํ˜ธํ™”ํ•˜๋Š” ๋ฐ ์ด๊ฒƒ๋ณด๋‹ค๋Š” ํ›จ์”ฌ ์„ฑ๋Šฅ์ด ๋นจ๋ผ์•ผ ํ•œ๋‹ค. ๋ฒ•๋ฅ ์„ ์ค€์ˆ˜ํ•˜๋Š” ๋ณด์•ˆ ์„ค๊ณ„ํ”„๋กœ์ ํŠธ ์ˆ˜ํ–‰ ์‹œ ์ •๋ณด ์‹œ์Šคํ…œ์„

django ์„œ๋ฒ„์˜ ๊ฐœ์ธ์ •๋ณด๋ฅผ AES-256-GCM ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ์•”ํ˜ธํ™”ํ•˜๊ธฐ
python

django ์„œ๋ฒ„์˜ ๊ฐœ์ธ์ •๋ณด๋ฅผ AES-256-GCM ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ์•”ํ˜ธํ™”ํ•˜๊ธฐ

์ด๋ฒˆ ์ž‘์—…์€...์„ฑ๋Šฅ์ด ๋งค์šฐ ๋‚ฎ์€ ๋ ˆ๊ฑฐ์‹œ๋ฅผ ์ณ๋‚ด๋Š” ์ž‘์—…์ด์—ˆ๋‹ค. ์ด๋ฒˆ ์ž‘์—…์˜ ์š”๊ตฌ์‚ฌํ•ญ์€ ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์˜ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์„ฑ๋Šฅ์ด ๊ธฐ์กด๋ณด๋‹ค ๋นจ๋ผ์•ผ ํ•  ๊ฒƒ aws KMS๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ๋„คํŠธ์›Œํฌ๋ฅผ ํƒ€์•ผํ•˜๋‹ค๋ณด๋‹ˆ ์•”ํ˜ธํ™”๊ฐ€ ๋Š๋ ธ๋‹ค. ๊ฐœ์ธ์ •๋ณด๋ฅผ ์•”ํ˜ธํ™”ํ•˜๋Š” ๋ฐ ์ด๊ฒƒ๋ณด๋‹ค๋Š” ํ›จ์”ฌ ์„ฑ๋Šฅ์ด ๋นจ๋ผ์•ผ ํ•œ๋‹ค. ๋ฒ•๋ฅ ์„ ์ค€์ˆ˜ํ•˜๋Š” ๋ณด์•ˆ ์„ค๊ณ„ํ”„๋กœ์ ํŠธ ์ˆ˜ํ–‰ ์‹œ ์ •๋ณด ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•˜๊ฒŒ ๋˜๊ณ  ์ •๋ณด ์‹œ์Šคํ…œ์„ ๋ณดํ˜ธํ•˜๊ธฐ

FastAPI์— Rate-limit(Throttling) ๊ตฌํ˜„
python

FastAPI์— Rate-limit(Throttling) ๊ตฌํ˜„

๋„ˆ์–ด์–ด๋ฌด ์‰ฝ๋‹ค ์ด๋ง์ด์•ผ!ImplementationRedis ํด๋Ÿฌ์Šคํ„ฐ ํ˜น์€ ์ธ์Šคํ„ด์Šค ์ƒ์„ฑk8s ํ”„๋กœ์ ํŠธ ๋‚ด์— redis ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜์˜€๋‹ค. ์šด์˜ ํ™˜๊ฒฝ์— ๋”ฐ๋ผ ๋‹ค๋ฅผ ์ˆ˜๋„ ์žˆ๊ฒ ์ง€๋งŒ, ์•„๋ž˜์™€ ๊ฐ™์€ manifest๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ์‚ฌ์‹ค ๊ผญ redis๋ฅผ ์‚ฌ์šฉํ•  ํ•„์š”๋Š” ์—†์ง€๋งŒ, ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ์„ฑ์ˆ™ํ•จ๊ณผ ๋ฉ€ํ‹ฐ Pod์œผ๋กœ ์šด์˜๋˜์—ˆ์„ ๋•Œ๋ฅผ ๊ณ ๋ คํ•œ๋‹ค๋ฉด ์“ฐ๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. apiVersion: v1 kind: Pod metadata: name: <APPLICATION>-redis

Atlassian Statuspage ๋„์ž…๊ณผ ์ž๋™ํ™” ์ ์šฉ๊ธฐ
Automation

Atlassian Statuspage ๋„์ž…๊ณผ ์ž๋™ํ™” ์ ์šฉ๊ธฐ

๋„์ž…Why you need a status page - Work Life by AtlassianA status page is an essential part of any incident communication strategy; they can can turn negative customer experiences into positive ones.AtlassianChase Wilson์šฐ๋ฆฌ๊ฐ€ statuspage๋ฅผ ์šด์˜ํ•ด์•ผ ํ•˜๋Š” ์ด์œ ์— ๋Œ€ํ•ด..๋งŽ์€ ์„œ๋น„์Šค๋“ค์ด ์žฅ์•  ๋ฐœ์ƒ๊ณผ ํ•ด๊ฒฐ ์ƒํƒœ ๊ณต์œ ๋ฅผ ๊ทธ ์‚ฌ์šฉ์ž๋“ค์—๊ฒŒ ๊ณต์œ ํ•˜๊ธฐ ์œ„ํ•ด

etcd ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ aws์— terraform์œผ๋กœ ๋งŒ๋“ค๊ธฐ
AWS

etcd ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ aws์— terraform์œผ๋กœ ๋งŒ๋“ค๊ธฐ

GitHub - byunjuneseok/aws-ec2-etcd-cluster-with-terraform: Provision EC2 etcd cluster with terraformProvision EC2 etcd cluster with terraform . Contribute to byunjuneseok/aws-ec2-etcd-cluster-with-terraform development by creating an account on GitHub.GitHubbyunjuneseokTerraform์œผ๋กœ ์ž‘์—…ํ•œ etcd cluster ์ฝ”๋“œ์‚ฌ์‹ค ๋ณ„ ์—„์ฒญ๋‚œ ๊ฒƒ์„ ํ•œ ๊ฑด ์•„๋‹ˆ๊ณ , etcd ๋‚ด๋ถ€ ๊ตฌ๊ฒฝํ•  ๊ฒธ EC2 etcd ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด๋ดค๋‹ค. ๊ฐ„๋‹จํ•˜๊ฒŒ terraform.tfvars.example ์„

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋กœ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž.
K8s

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋กœ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž.

1. ์‹œ์ž‘!๋ฝ๋ฟŒ์˜ ๋ฐœ๋‹จ!!!!!!!์นจ๋Œ€์— ๋ˆ„์›Œ ์œ ํŠœ๋ธŒ์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํƒํ—˜ํ•˜๋‹ค๊ฐ€ ํ•˜๋‚˜์˜ ์˜์ƒ์„ ๋ณด๊ฒŒ ๋˜์—ˆ๋Š”๋ฐ, ๊ฒฐ๊ตญ ์นด๋“œ ๊ฒฐ์ œ๊นŒ์ง€ ๊ฐ€๋Š” ๊ฑด ํ•œ์ˆœ๊ฐ„์ด์—ˆ๋‹ค. ย ์ด ์˜์ƒ์„ ๋ณด๊ณ  ๊ฐ‘์ž๊ธฐ ๊ณต๋Œ€์ƒ์˜ ํ”ผ๊ฐ€ ๋“๋Š” ๋„ˆ๋‚Œ์ด ๋“ค์—ˆ๋‹ฌ๊นŒ? ๋ฐ”๋กœ ์นจ๋Œ€ ์œ„์—์„œ ๋งฅ๋ถ์„ ํŽด๊ณ  ์กฐ์‚ฌ์— ์ฐฉ์ˆ˜ํ–ˆ๋‹ค. 2. ๊ตฌ์ƒํ•˜๋“œ์›จ์–ด ์ถœ์ฒ˜ : https://kubernetes.io/ko/docs/concepts/overview/components/์‚ฌ์‹ค ๋Œ€๋‹จํ•œ ๊ตฌ์ƒ์€ ์—†๋‹ค.

FastAPI ์—์„œ Request Body ๋ฅผ ๋กœ๊น…ํ•˜๋Š” ๋ฐฉ๋ฒ•
FastAPI

FastAPI ์—์„œ Request Body ๋ฅผ ๋กœ๊น…ํ•˜๋Š” ๋ฐฉ๋ฒ•

์˜์™ธ๋กœ ์šด์˜์— ๋งค์šฐ ํ•„์š”ํ•œ ๊ธฐ๋Šฅ์ธ๋ฐ, ๊น”๋”ํ•œ ํ•ธ๋“ค๋ง ๋ฐฉ๋ฒ•์„ ๋ชป์ฐพ๋Š”๋‹ค. ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ์š”๊ตฌ์‚ฌํ•ญ์€ ์ด๋žฌ๋‹ค. ์ ˆ๋Œ€๋กœ API ๋กœ์ง์ด ์žˆ๋Š” View์ฝ”๋“œ ์•ˆ์— ๋กœ๊น…์„ ์œ„ํ•œ ์ฝ”๋“œ๊ฐ€ 1์ค„๋„ ๋“ค์–ด๊ฐ€์„  ์•ˆ๋œ๋‹ค.๋ชจ๋“  ํ•จ์ˆ˜๋งˆ๋‹ค ๋ฐ˜๋ณตํ•ด์„œ ์ ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ์€ ์•ˆ๋œ๋‹ค.Middleware๋กœ ์ฒ˜๋ฆฌ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ๋‹ค. (์‚ฌ์‹ค ์ด๊ฒŒ ์ œ์ผ ์–ด๋ ค์šด ํฌ์ธํŠธ)์•„๋ฌด๋ฆฌ ์ฐพ์•„๋ดค์ง€๋งŒ, ๋พฐ์กฑํ•˜๊ฒŒ ์ƒ๊ฐ๋‚˜๋Š” ๋ฐฉ๋ฒ•์€ ์—†์—ˆ๋‹ค. starlette์˜ Request body๋ฅผ ๊นŒ๋Š”

FastAPI ์—์„œ์˜ No Content (204) ์‘๋‹ต ์‹œ ๊ผญ ํ•ด์ค˜์•ผ ํ•˜๋Š” ๊ฒƒ
python

FastAPI ์—์„œ์˜ No Content (204) ์‘๋‹ต ์‹œ ๊ผญ ํ•ด์ค˜์•ผ ํ•˜๋Š” ๊ฒƒ

204 No Content204 No Content - HTTP | MDNThe HTTP 204 No Content success status response code indicates that a request has succeeded, but that the client doesnโ€™t need to navigate away from its current page.MDN๊ฐœ๋ฐœํ•  ๋• MDN์ด ๋งค์šฐ ์ข‹์€ ์ด์ •ํ‘œ๊ฐ€ ๋  ๊ฒƒ.RFC 7230 ๋ฌธ์„œ์— ์˜ํ•˜๋ฉด, 204 ์‘๋‹ต์˜

M1 ๋ฐ”์ด๋„ˆ๋ฆฌ๊ฐ€ ์ œ๊ณต๋˜์ง€ ์•Š๋Š” ํ…Œ๋ผํผ ํ”„๋กœ๋ฐ”์ด๋” ๋นŒ๋“œํ•ด์„œ ์“ฐ๊ธฐ (hashicorp/template)
golang

M1 ๋ฐ”์ด๋„ˆ๋ฆฌ๊ฐ€ ์ œ๊ณต๋˜์ง€ ์•Š๋Š” ํ…Œ๋ผํผ ํ”„๋กœ๋ฐ”์ด๋” ๋นŒ๋“œํ•ด์„œ ์“ฐ๊ธฐ (hashicorp/template)

terraform init ์‹คํŒจํ•œ๋‹ค.ํ…Œ๋ผํผ์„ m1 ๋งฅ๋ถ์œผ๋กœ ์‚ฌ์šฉํ•  ๋•Œ ๊ฐ€๋”, arm64 ๋‹ค์œˆ ์ปค๋„์šฉ ๋ฐ”์ด๋„ˆ๋ฆฌ๊ฐ€ ์—†์–ด์„œ terraform init ์— ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ๋‚ด๊ฐ€ ์ตœ๊ทผ์— ๊ฒช์€ hashicorp/template ์˜ ๊ฒฝ์šฐ๋กœ ํ•ด๊ฒฐํ•˜๋Š” ์งง์€ ๊ฒฝํ—˜์„ ๊ณต์œ ํ•˜๊ณ ์ž ํ•œ๋‹ค. What is the "Provider"?Home - Plugin Development - Terraform by HashiCorpLearn about developing plugins that connect Terraform

Docker ์ด๋ฏธ์ง€๋กœ AWS Lambda ๋งŒ๋“ค๊ธฐ (Boilerplate ํฌํ•จ)
AWS

Docker ์ด๋ฏธ์ง€๋กœ AWS Lambda ๋งŒ๋“ค๊ธฐ (Boilerplate ํฌํ•จ)

2020๋…„ ๋ง, AWS Lambda์˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์œผ๋กœ ์ปจํ…Œ์ด๋„ˆ ์ด๋ฏธ์ง€ ์ง€์›์ด ๋ฐœํ‘œ๋˜์—ˆ๋‹ค. ๊ธฐ์กด lambda ์˜ ํ”„๋กœ๋น„์ €๋‹์— ๋น„ํ•ด ์–ป์„ ์ˆ˜ ์žˆ๋Š” ์ด์ ์„ ์š”์•ฝํ•˜์ž๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. - ์ตœ๋Œ€ 10GB ํฌ๊ธฐ์˜ ์ปจํ…Œ์ด๋„ˆ ์ด๋ฏธ์ง€๋กœ ํŒจํ‚ค์ง• ๋ฐ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ ์ œ๊ณต - Dependencies ๊ด€๋ฆฌ ๋ฐ ์„ค์น˜์˜ ์šฉ์ด์„ฑ - ๋‹ค๋ฅธ linux distro ์˜ ์ด๋ฏธ์ง€์—์„œ๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•จ. (๋‹ค๋งŒ,

Github Actions ์˜ crontab ์Šค์ผ€์ฅด๋ง ๊ธฐ๋Šฅ์œผ๋กœ ์™ธ์ฃผ ํ”„๋กœ์ ํŠธ์˜ Certbot SSL ์ธ์ฆ์„œ ์žฌ๋ฐœ๊ธ‰ย ์ž๋™ํ™”ํ•˜๊ธฐ
Automation

Github Actions ์˜ crontab ์Šค์ผ€์ฅด๋ง ๊ธฐ๋Šฅ์œผ๋กœ ์™ธ์ฃผ ํ”„๋กœ์ ํŠธ์˜ Certbot SSL ์ธ์ฆ์„œ ์žฌ๋ฐœ๊ธ‰ย ์ž๋™ํ™”ํ•˜๊ธฐ

Github Actions ์—์„œ์˜ crontab ์Šค์ผ€์ฅด๋ง?Github Actions์€ crontab scheduling ์„ ์ง€์›ํ•œ๋‹ค. ์ ๋‹นํžˆ ๊ฐ„๋‹จํ•œ job ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋Œ๋ฆฌ๊ณ  ์‹ถ์„ ๋•Œ, aws ์—์„œ cron event ๋กœ lambda ๋ฅผ ํŠธ๋ฆฌ๊ฑฐํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ ํƒํ•  ์ˆ˜๋„ ์žˆ๊ฒ ๋‹ค. ํ•˜์ง€๋งŒ ์ด๋Š” lambda ๋ฅผ ์œ„ํ•œ ์ถ”๊ฐ€์ ์ธ ๊ตฌํ˜„ ์ˆ˜์ •์ด ํ•„์š”ํ•˜๊ณ  aws๋ฅผ ์ž˜ ๋ชจ๋ฅด๋Š” ๊ฐœ๋ฐœ์ž๋ผ๋ฉด ์ด์œ ๋ชจ๋ฅผ ๋น„์šฉ ์ฒญ๊ตฌ์— ๋Œ€ํ•œ ๋‘๋ ค์›€์ด ์žˆ์„

AWS S3, Cloudfront, Route53๊ณผ github Actions์œผ๋กœ ์ •์  ์›นํŽ˜์ด์ง€ ๋ฐฐํฌ, ํ˜ธ์ŠคํŒ…ย ์ž๋™ํ™”ํ•˜๊ธฐ
AWS

AWS S3, Cloudfront, Route53๊ณผ github Actions์œผ๋กœ ์ •์  ์›นํŽ˜์ด์ง€ ๋ฐฐํฌ, ํ˜ธ์ŠคํŒ…ย ์ž๋™ํ™”ํ•˜๊ธฐ

๋“ค์–ด๊ฐ€๊ธฐ ์ „์—์˜ˆ์ „์— ์ž ๊น ์ฐฝ์—…์— ๋ฐœ์„ ์‚ด์ง ๋“ค์˜€์„ ๋•Œ, ํŒ€ ์‚ฌ์ดํŠธ๋ฅผ ์˜ค๋Š˜ ์†Œ๊ฐœํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ๋ฐฐํฌํ•œ ์ ์ด ์žˆ๋‹ค. ์ƒˆ๋กœ์šด ๋ธ”๋กœ๊ทธ๋ฅผ ์ตœ๊ทผ์— ๋งŒ๋“ค์—ˆ๋Š”๋ฐ, ์ด ํŽ˜์ด์ง€๋ฅผ ๋ฐฐํฌํ•  ๋ฐฉ๋ฒ•์œผ๋กœ netlify ๊ฐ™์€ ์„œ๋น„์Šค๋„ ๊ณ ๋ฏผํ–ˆ์ง€๋งŒ, ๊ทธ๋ƒฅ ๊น”๋”ํ•˜๊ฒŒ ๋‚ด๊ฐ€ ๋‹ค ๋งŒ๋“ค์–ด๋ฒ„๋ฆฌ๊ณ  ๋ธ”๋กœ๊ทธ ํฌ์ŠคํŒ…๋„ ํ•˜์ž๋Š” ์ƒ๊ฐ์œผ๋กœ ๋‹ค์‹œ ์‹œ๋„ํ•˜๋ฉด์„œ ์ •๋ฆฌํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ์ด ํฌ์ŠคํŠธ์—์„œ๋Š” vue, react ์˜ Client side application ๋ฟ๋งŒ

์• ์ž์ผํ•˜๊ฒŒ ์กธํ”„ํ•˜๊ธฐ; 1ํ•™๊ธฐ
Story

์• ์ž์ผํ•˜๊ฒŒ ์กธํ”„ํ•˜๊ธฐ; 1ํ•™๊ธฐ

ํ”„๋กœ์ ํŠธ ์‹œ์ž‘ํ•˜๊ธฐ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ ํ•™์ƒ์ด๋ผ๋ฉด ๋ˆ„๊ตฌ๋‚˜ 4ํ•™๋…„์— ํ”„๋กœ์ ํŠธ๋ฅผ ์˜๋ฌด์ ์œผ๋กœ ํ•˜๊ฒŒ๋œ๋‹ค. ๊ฐ–์€ ํ’ํŒŒ(?)๋ฅผ ๊ฒฌ๋ŽŒ๋‚ด๊ณ  29์‚ด์— 4ํ•™๋…„์„ ๋‹ค๋‹ˆ๊ณ  ์žˆ๋Š” ๋‚˜๋กœ์„œ๋Š” ๊ฝค๋‚˜ ํฐ ๊ณ ๋ฏผ๊ฑฐ๋ฆฌ์˜€๋‹ค. ์กธ์—… ํ”„๋กœ์ ํŠธ๋ฅผ ๋‚จ๋“ค์ฒ˜๋Ÿผ ๋Œ€์ถฉ๋Œ€์ถฉ CRUD ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜๋งŒ ๋งŒ๋“ค๊ธฐ์—” ๋‚ด ์‹œ๊ฐ„์ด ๋„ˆ๋ฌด ์•„๊นŒ์› ๋‹ค. ๊ทธ๋ ‡๋‹ค๊ณ  ์–ด๋งˆ์–ด๋งˆํ•œ ์‹œ๊ฐ„์„ ์Ÿ์•„๋ถ€์–ด ๋‚ด๊ฐ€ ๋งŒ์กฑํ• ๋งŒํ•œ ํ€„๋ฆฌํ‹ฐ์˜ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ๋‚ด๊ธฐ์—” ๋ถ€๋‹ด์ด ์ปธ๋‹ค. ๋‚˜๋Š” ์Šคํƒ€ํŠธ์—…์—์„œ ๊ฐœ๋ฐœ์ž๋กœ ์ผํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ์ฝ”๋กœ๋‚˜๋ผ๋Š” ํŠน์ˆ˜ํ•œ ์ƒํ™ฉ์œผ๋กœ

AWS Elastic Beanstalk Amazon Linux2 ํ™˜๊ฒฝ์—์„œ์˜ ๋กœ๊ทธ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• (Amazon Cloudwatch & EB Web Console)
AWS

AWS Elastic Beanstalk Amazon Linux2 ํ™˜๊ฒฝ์—์„œ์˜ ๋กœ๊ทธ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• (Amazon Cloudwatch & EB Web Console)

์ง€๋‚œ ๋ธ”๋กœ๊น…์„ ํ†ตํ•ด Amazon Linux 1 ํ™˜๊ฒฝ์˜ Elastic Beanstalk ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ƒˆ๋กœ์šด Amazon Linux2 ํ™˜๊ฒฝ์œผ๋กœ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํ•˜๋Š” ๊ณผ์ •์„ ์†Œ๊ฐœํ•˜์˜€๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” Elastic Beanstalk ์›น ์ฝ˜์†”๊ณผ Amazon Cloudwatch ๋ฅผ ํ†ตํ•ด์„œ ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ๋กœ๊ทธ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์†Œ๊ฐœํ•˜๋ ค๊ณ  ํ•œ๋‹ค. ์šฐ๋ฆฌ์˜ API ์„œ๋ฒ„์ธ sachiel ์€ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์œ„ํ•ด API ํ˜ธ์ถœ๊ณผ exception ๋กœ๊ทธ๋ฅผ ๋ถ„๋ฆฌํ•ด์„œ ์ €์žฅํ•˜๊ณ 

elastic beanstalk Amazon Linux2 python ํ™˜๊ฒฝ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํ›„๊ธฐ
AWS

elastic beanstalk Amazon Linux2 python ํ™˜๊ฒฝ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํ›„๊ธฐ

HBsmith ๋Š” ๋ฉ”์ธ ๋ฐฑ์—”๋“œ API ์„œ๋ฒ„์™€ ๋ฐฑ์˜คํ”ผ์Šค ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ aws ์˜ elastic beanstalk ์„œ๋น„์Šค๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌํ•˜๊ณ  ์žˆ๋‹ค. 2011๋…„์— ์ถœ์‹œ๋œ ์„œ๋น„์Šค์ธ ๋งŒํผ ๋งŽ์€ ๋ ˆํผ๋Ÿฐ์Šค์™€ ์ž๋ฃŒ๋“ค์ด ์กด์žฌํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ๋ชจ๋“  ์กฐ์ง/์„œ๋น„์Šค๊ฐ€ ํ•ญ์ƒ ์ปจํ…Œ์ด๋„ˆ๋ผ๋Š” ๊ธฐ์ˆ ์ด ํ•ญ์ƒ ๋‹ต์ด ๋  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์•„์ง๋„ ๋งŽ์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ๋Š” ์„œ๋น„์Šค์ด๋‹ค. ์šฐ๋ฆฌ๋Š” โ€œAmazon Linux 2018.03 v2.9.20

DRF (django restframework)์—์„œ HMAC Authentication ๊ตฌํ˜„ํ•˜๊ธฐ
python

DRF (django restframework)์—์„œ HMAC Authentication ๊ตฌํ˜„ํ•˜๊ธฐ

Introduction๋‚ด๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” API ์„œ๋ฒ„๋Š” ๋‹ค์–‘ํ•œ ํƒ€์ž…์˜ ํด๋ผ์ด์–ธํŠธ๋“ค๋กœ ์˜ค๋Š” ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๊ณ  ์žˆ๋‹ค. ๊ธฐ๋ณธ์ ์ธ oauth ์ธ์ฆ์„ ์ด์šฉํ•˜๋Š” ์›น ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ, Windows server application, aws lambda ๋“ฑ ๋งŽ์€ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด HMAC ์ธ์ฆ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค. DRF (django Rest Framework)์˜ Permission Class ๋กœ ๊ตฌํ˜„๋˜์ง€ ์•Š๊ณ , view ๋กœ์ง์— signature ๊ฒ€์ฆ ๋กœ์ง์ด ์žˆ๋Š” ์ƒํƒœ๋‹ค. ์ฆ‰, ์•„๋ฌด

aws MFA OTP๋ฅผ ์žƒ์–ด๋ฒ„๋ ธ์„ ๋•Œ (Google Authenticator)โ€Š-โ€ŠDevOps์—”์ง€๋‹ˆ์–ด๊ฐ€ ํ•œ ์Šคํ”„๋ฆฐํŠธ ์—…๋ฌด๋ฅผ ํ†ต์งธ๋กœ ๋‚ ๋ฆด๋ป”ํ•œย ์ฐ
AWS

aws MFA OTP๋ฅผ ์žƒ์–ด๋ฒ„๋ ธ์„ ๋•Œ (Google Authenticator)โ€Š-โ€ŠDevOps์—”์ง€๋‹ˆ์–ด๊ฐ€ ํ•œ ์Šคํ”„๋ฆฐํŠธ ์—…๋ฌด๋ฅผ ํ†ต์งธ๋กœ ๋‚ ๋ฆด๋ป”ํ•œย ์ฐ

์ƒˆ ์•„์ดํฐ์„ ๊ตฌ๋งคํ•˜๊ณ  ๊ธฐ์กด ์•„์ดํฐ์—์„œ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ํ–ˆ๋‹ค. ๋‚˜๋Š” ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์„ ํ•˜๋ฉด, Google Authenticator ์•ฑ ์ •๋ณด๊ฐ€ ๊ทธ๋Œ€๋กœ ๋„˜์–ด์˜ฌ ๊ฑฐ๋ผ ์ƒ๊ฐํ–ˆ๋‹ค. ์‚ฌ์‹ค ์•„๋ฌด ์ƒ๊ฐ๋„ ์•ˆํ•˜๊ณ  ์“ฐ๋˜ ์•„์ดํฐ์„ ์ดˆ๊ธฐํ™”ํ–ˆ๋‹ค. ๐Ÿ˜… ๋งค์ผ aws ์›น์ฝ˜์†”์„ ์ ‘์†ํ•˜๋Š” ๋‚˜์—๊ฒŒ MFA OTP๋ฅผ ์žƒ์–ด๋ฒ„๋ฆฐ ์‚ฌ๊ณ ๋Š” ๋งค์šฐ ์น˜๋ช…์ ์ด์—ˆ๋‹ค. ์ด๊ฑธ ๋‹น์žฅ ๋ณต๊ตฌํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, ์—…๋ฌด์— ํฐ ์ฐจ์งˆ์„ ๋นš์„ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ๊ธ‰ํ•œ ๋งˆ์Œ์— aws ๋กœ๊ทธ์ธ ํ™”๋ฉด์—์„œ

Infrastructure as Code ๋ฅผ ์ฝ๊ณ ๋‚˜์„œย (1)
Infrastructure

Infrastructure as Code ๋ฅผ ์ฝ๊ณ ๋‚˜์„œย (1)

๋Œ€๊ทœ๋ชจ ์ธํ”„๋ผ ์šด์˜์— ์‚ฌ๋žŒ์˜ ์ˆ˜์ž‘์—…์„ ์ตœ์†Œํ™”ํ•˜๋ ค๋ฉด ๊ฒฐ๊ตญ ์ž๋™ํ™”๋งŒ์ด ํ•ด๋‹ต์ด๋‹ค. ์ž๋™ํ™”๋Š” ๊ณง ์Šคํฌ๋ฆฝํŠธ๋‚˜ ์†Œํ”„ํŠธ์›จ์–ด์˜ ์˜์—ญ์ด๋ผ๋Š” ์ ์—์„œ ํด๋ผ์šฐ๋“œ ์ธํ”„๋ผ ์šด์˜์ž๋ผ๋ฉด ์–ด์ฉ” ์ˆ˜ ์—†์ด ๊ฐœ๋ฐœ ์„ธ๊ณ„๋ฅผ ๊ธฐ์›ƒ๊ฑฐ๋ฆด ์ˆ˜ ๋ฐ–์— ์—†๊ฒŒ ๋œ๋‹ค. ๊ณ„๋ฐœ ์„ธ๊ณ„์˜ ์ดˆ๊ธฐ ์ง„์ž… ์žฅ๋ฒฝ์„ ๊ณ ๋ คํ•˜๋ ค๋ฉด ๊ฐœ๋ฐœ์ž๊ฐ€ ์ธํ”„๋ผ ์šด์˜์„ ๋ฐฐ์šฐ๋Š” ๊ฒŒ ๋” ๋‚˜์•„๋ณด์ด๊ธฐ๋„ ํ•œ๋‹ค. ์–ด์จŒ๋“  ์ธํ”„๋ผ ์šด์˜์ž๋Š” ์ž๋™ํ™”๋ฅผ ์œ„ํ•œ ์ตœ์†Œํ•œ์˜ ๊ฐœ๋ฐœ ๋Šฅ๋ ฅ๊ณผ

ํŒŒ์ด์ฌ์˜ ๋ชจ๋“  ๋ณ€์ˆ˜๋Š” ๊ฐ์ฒด(Object)ย : C์™€์˜ย ์ฐจ์ด์ ์€?
python

ํŒŒ์ด์ฌ์˜ ๋ชจ๋“  ๋ณ€์ˆ˜๋Š” ๊ฐ์ฒด(Object)ย : C์™€์˜ย ์ฐจ์ด์ ์€?

2019๋…„์— ์ž‘์„ฑํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. (https://www.binaryflavor.com/3) ํŒŒ์ด์ฌ์€ ํŒŒ์ด์ฌ๋งŒ์˜ ๋ฐฐ์šฐ๊ธฐ ์‰ฌ์šด ๋ฌธ๋ฒ•๋•Œ๋ฌธ์— ์ž˜ ๋‹ค๋ฃจ๊ธฐ ์‰ฝ๋‹ค๋Š” ์˜คํ•ด๋ฅผ ๋ฐ›์Šต๋‹ˆ๋‹ค. ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ๊ผผ๊ผผํžˆ ์‚ดํŽด๋ณด๋ฉด ํŒŒ์ด์ฌ์˜ ๊ตฌํ˜„์„ ์ž˜ ์„ค๋ช…๋˜์–ด ์žˆ๋Š”๋ฐ, ๊ฝค ๋ณต์žกํ•œ ๊ตฌ์กฐ๋กœ ๊ตฌํ˜„์ด ๋˜์–ด ์žˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‹œ๊ฐ„์ด ํ—ˆ๋ฝํ•œ๋‹ค๋ฉด ๊ผญ ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ์ฝ์–ด๋ณด์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. C vs Python (Cpython)/* C code */ int