In this step, you can chose whether you want to create the Amazon SNS topic via the AWS console or AWS SAM. Just select the corresponding tab below and follow the instructions:
In your Amazon SNS console, select Topic in the left navigation pane and click the Create topic button in the top right corner.
Enter the topic name RideCompletionTopic and leave the default values. Scroll to the bottom of the page and click Create topic.
In your Cloud9 IDE for this workshop, open the SAM template file
wild-rydes-async-messaging/lab-2/template.yaml. In the Resources section, add the definition for an Amazon SNS topic with the name RideCompletionTopic. You can find the AWS CloudFormation documentation to do so here.
RideCompletionTopic: Type: AWS::SNS::Topic Properties: TopicName: RideCompletionTopic
Run the following command to build the lab again, after we have added the Amazon SNS topic:
cd ~/environment/wild-rydes-async-messaging/lab-2 sam build
Now we are ready to update the application, by running the following command to deploy the change:
sam deploy \ --guided \ --stack-name wild-rydes-async-msg-2 \ --capabilities CAPABILITY_IAM
In the meantime while your waiting, you may want to have a look at the AWS SAM template to make yourself familiar with the stack we launched. Just click on the template.yaml attachment below to see the content.
Because AWS SAM will only deploy/update/delete resources which are changed, it only takes a couple of seconds to deploy the new Amazon SNS topic.