aws-samples / aws-samples/eb-node-express-sample

`AWS_REGION` vs `REGION` environment variables

Đang mở
#9 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
EJS
Star
279
Fork
247
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

In `.ebextensions/options.config` it is the `AWS_REGION` environment variable that is set, but in `app.js`, the code refers to the `REGION` environment variable to set `AWS.config.region`. Inspection of running system on launched EB environment shows that indeed `REGION` is actually not set.

Although the code still appears to work, I believe that the intention was to say `AWS.config.region = process.env.AWS_REGION` instead (otherwise `AWS_REGION` is not used anywhere). I'm a bit puzzled as to why the code still works when `AWS.config.region` is set to undefined (especially after one switches to use `nodejs-tutorial` for table name). How does the running process know to use the correct region in this case?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Compare the AWS_REGION setting in .ebextensions/options.config with the REGION lookup in app.js, then inspect how the running Elastic Beanstalk process obtains its region. Verify the intended variable is used consistently and confirm the sample still starts and accesses its configured table in the expected region.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, express, node.js
Lĩnh vực
backend, cloud
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.