Skip to content

Commit c1fe0e3

Browse files
committedMay 18, 2021
update posts
1 parent 9d2e3a2 commit c1fe0e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎content/posts/quan-ly-tap-trung-.env-file.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Cách làm này đơn giản nên có ưu điểm là lấy ra và phục hồi
2929
Giả sử nếu chúng ta lưu file .env cho môi trường staging dưới key path là `/service-name/env/stg`, chỉ cần 1 câu lệnh sau là có thể khôi phục ra file .env rồi.
3030

3131
```
32-
$ aws ssm get-parameters-by-path --path /service-name/env/stg --with-decryption > .env
32+
$ aws ssm get-parameter --name /service-name/env/stg --region ap-northeast-1 --query Parameter.Value --with-decryption > .env
3333
```
3434

3535
Tuy nhiên nếu như file .env của dự án của bạn quá lớn thì khả năng sẽ không thể xài cách này được nữa. Lý do là parameter store có áp đặt upper limit 4096 characters cho 1 param, không thể lưu 1 đoạn text dài hơn giới hạn đó được.

0 commit comments

Comments
 (0)
Please sign in to comment.