Tạo Customer accounting service
Tạo Customer accounting service
- Truy cập vào SNS
- Chọn Topic
- Chọn RideCompletionTopic
- Chọn Create subscription

- Quay lại Terminal trong VS Code chạy lệnh để xem Endpoint
aws cloudformation describe-stacks \
--stack-name wild-rydes-async-msg-1 \
--query 'Stacks[].Outputs[?OutputKey==`CustomerAccountingFunction`].OutputValue' \
--output text

- Trong giao diện Create subscription
- Topic ARN giữ mặc định
- Protocol, chọn Lambda
- Endpoint, nhập giá trị Output từ Terminal
- Chọn Create subscription

- Hoàn thành tạo subscription

- Truy cập vào AWS Lambda
- Chọn Customer Accounting function

- Kiểm tra Lambda function đã trigger SNS.
