Creating and Subscribing to an SNS Topic

Lab Steps

lock
Logging in to the Amazon Web Services Console
lock
Opening the AWS Cloud9 IDE
lock
Understanding the Infrastructure as Code Project
lock
Using Terraform's Built-In Analysis Capabilities
lock
Working with TFLint
lock
Working With Terrascan
lock
Configuring the Jenkins Automation Server
lock
Triggering Jenkins Builds
lock
Creating and Subscribing to an SNS Topic
lock
Receiving Build Alerts
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.

Introduction

You now have static analysis of your IaC integrated into your continuous integration pipeline. The problem now is that you would never know the build failed unless you go to the Jenkins page. You will add alerting to automatically notify you of the build result.

Jenkins has a variety of plugins to support a range of notification requirements. For example, Jenkins can directly send emails, or post a message to a Slack channel. You will configure Jenkins to publish a message to an Amazon Simple Notification Service (SNS) topic. You will create the SNS topic and subscribe to it using your email address in this Lab Step.

 

Instructions

1. In the AWS Management Console search bar, enter SNS, and click the Simple Notification Service result under Services:

alt

 

2. If you see the following welcome page, click Topics on the left-side menu:

alt

 

3. Click Create topic:

alt

 

4. In the Create new topic form, enter the following values and click Create topic:

  • TypeStandard
  • Name: build-results
  • Display name: build

alt

 

5. Copy the Amazon Resource Name (ARN) in the Topic details:

alt

You need the ARN in order to identify the topic you want to subscribe to.

 

6. From the Topic dashboard, click Create subscription:

alt

 

7. In the Create subscription form, enter the following values and click Create subscription:

  • Protocol: Email
  • Endpoint: Enter your valid email address (for example, john.doe@cloudacademy.com).

alt

 

8. Notice that the subscription is pending confirmation in the Topic details page:

alt

 

9. Open your email client. Find and open the new email from the SNS topic you created; AWS Notification is part of the the subject line:

alt

 

10. Click the Confirm subscription link:

alt

 You will see a Subscription confirmed screen similar to the following:

alt

 

11. Return to the Topic details page for the SNS topic you created earlier.

Notice the Subscription ARN changed from PendingConfirmation to the actual Subscription ID.

 

Summary

In this Lab Step, you created and subscribed to an SNS topic that will be used to receive build notifications.

Validation checks
1Checks
Created the SNS Topic

Check that the SNS topic has been created

Amazon Simple Notification Service (SNS)

Learning Pathnavigation