All Articles

Zappa둜 λ°°ν¬ν•œ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ—μ„œ S3 κ΄€λ ¨ μ—λŸ¬κ°€(HeadBucket) λ‚  λ•Œ

Zappa둜 Djangoλ‚˜ Flask 앱을 배포할 λ•Œ ν”νžˆ static νŒŒμΌμ€ s3에 올리게 λ˜λŠ”λ°, zappa 배포도 잘 되고, django-stoarages 등을 μ΄μš©ν•œ static 파일 μ—…λ‘œλ“œλ„ 잘 λ˜μ—ˆλŠ”λ° 배포된 URL에 λ“€μ–΄κ°€λ©΄ λžŒλ‹€ ν•¨μˆ˜μ—μ„œ s3 버킷에 접근이 μ•„μ˜ˆ μ•ˆλ˜λŠ” κ²½μš°κ°€ μžˆλ‹€. 이 λ•Œ μ—¬λŸ¬κ°€μ§€ 원인이 μžˆκ² μ§€λ§Œ zappa_settings.jsonμ—μ„œ

   "profile_name": "your-profile-name", // AWS profile credentials to use. Default 'default'. Removing this setting will use the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables instead.

이 profile_name을 μ˜μ‹¬ν•΄ λ³Ό ν•„μš”κ°€ μžˆλ‹€. 보톡 ν”„λ‘œμ νŠΈλ§ˆλ‹€ AWS ν”„λ‘œν•„μ„ λ‹€λ₯΄κ²Œ μ‚¬μš©ν•˜λ €κ³  ν™˜κ²½ λ³€μˆ˜μ— μžˆλŠ” ν‚€λ₯Ό μ‚¬μš©ν•˜κ³€ ν•˜λŠ”λ°, μ € λ•Œ profile_name이 β€œdefaultβ€λ‘œ μ„€μ •λ˜μ–΄ 있으면 awscli에 λ“±λ‘λœ ν‚€λ‘œ zappaκ°€ λŒμ•„κ°„λ‹€. μ € ν•„λ“œλ₯Ό λΉ„μš°κ³  ν™˜κ²½ λ³€μˆ˜μ— μžˆλŠ” 정보λ₯Ό μ‚¬μš©ν•˜λ©΄ static νŒŒμΌμ„ μ˜¬λ Έμ„ λ•Œμ™€ λžŒλ‹€ ν•¨μˆ˜λ₯Ό 배포할 λ•Œ μ‚¬μš©ν•œ ν”„λ‘œν•„μ΄ κ°™μ•„μ Έμ„œ κΆŒν•œ λ¬Έμ œκ°€ λ°œμƒν•  ν™•λ₯ μ΄ 크게 쀄어든닀.

Published Feb 22, 2019

If I keep marking the dots, someday they will πŸ”—πŸ”—