[AWS] Resourceinitializationerror: unable to pull secrets or registry auth: ...
๋ด๋ถ๋ง ์ ์ฉ ํ๋ผ์ด๋น ์๋ฒ๋ฅผ ๋ง๋ค ํ์๊ฐ ์์ด์ ECS๋ฅผ private subnet ๊ธฐ๋ฐ์ผ๋ก ๊ตฌ์ถํ๋ ค ํ๋๋ฐ, ์ด๋ฐ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค.

Resourceinitializationerror: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve ecr registry auth: service call has been retried 3 time(s): RequestError: send request failed caused by: Post "https://api.ecr.ap-northeast-2.amazonaws.com/": dial tcp 52.95.196.84:443: i/o timeout
ECR์์ ๋์ธ ๋์ปค ์ด๋ฏธ์ง๋ฅผ ๋ชป๊ฐ์ ธ์จ๋ค๋ ๊ฒ์ด๋ค.
์ด๊ฒ, ์ด์งธ์์ธ์ง๋ ๋ชจ๋ฅด๊ฒ ์ง๋ง ECR์์ ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ ธ์ค๋ ๊ณผ์ ์ ์ธ๋ถ ์ธํฐ๋ท์ ๋ฌด์ธ๊ฐ๋ฅผ ํ์ผ ํ๋๊ฒ ์๋ ๊ฒ ๊ฐ์๋ค.
AWS์ ์ด์ํ๊ณ ๋ถํธํ ์ ์ค ํ๋๋ค.
์ด๊ฑธ ํด๊ฒฐํ๋ ๊ฐ์ฅ ๊ฐ๋จํ ๋ฐฉ๋ฒ์ ๊ทธ๋ฅ ์ธํฐ๋ท ๊ฒ์ดํธ์จ์ด๋ฅผ ์ฐ๊ฒฐํด์ ํผ๋ธ๋ฆญ ์๋ธ๋ท์ผ๋ก ๋ง๋๋ ๊ฑฐ๊ธด ํ๋ฐ, ๊ทธ๊ฒ ์ซ๋ค๋ฉด Nat ๊ฒ์ดํธ์จ์ด๋ฅผ public ์๋ธ๋ท ๊ธฐ๋ฐ์ผ๋ก ์๋ก ๋ง๋ค์ด์ ๋ถ์ฌ๋ ๋๋ค.
์์ฑ ์ฐฝ์ ๋ค์ด๊ฐ์
์๋ธ๋ท์๋ ๊ธฐ์กด ํผ๋ธ๋ฆญ ์๋ธ๋ท์ค ํ๋๋ฅผ ๋ฌ์์ฃผ๊ณ , ์ฐ๊ฒฐ ์ ํ "ํผ๋ธ๋ฆญ"์ผ๋ก ํ๋ค.
๊ทธ๋ฆฌ๊ณ ๋ถ์ฌ์ค๋ค.
๊ทธ๋ผ ๋ ๊ฒ์ด๋ค.
์ฐธ์กฐ
https://aws.amazon.com/ko/premiumsupport/knowledge-center/ecs-unable-to-pull-secrets/
https://medium.com/awesome-cloud/aws-vpc-difference-between-internet-gateway-and-nat-gateway-c9177e710af6