Tạo Amazon SNS Topic

Tạo Amazon SNS Topic

  1. Mở file template.yaml trên VS Code
  • Từ cây thư mục (Explorer) bên trái của VS Code, mở file SAM template tại đường dẫn: code/lab-1/template.yaml
  • Trong phần Resources, bỏ comment đoạn code sau (mẹo: bôi đen đoạn bị comment và nhấn Ctrl + /):
  RideCompletionTopic:
    Type: AWS::SNS::Topic
    Properties:
      TopicName: RideCompletionTopic

Working with SNS

  1. Mở Terminal trong VS Code và thực hiện build lại AWS SAM template
cd ~/wild-rydes-async-messaging/code/lab-1
sam build --use-container

Working with SNS

  1. Thực hiện triển khai khởi tạo SNS topic
sam deploy

Working with SNS