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 will configure the Amazon SNS Notifier plugin for Jenkins to send build result alerts through SNS in this Lab Step. You can then respond quickly when a build fails without having to watch the Jenkins project page.

 

Instructions

1. In the Jenkins browser tab, click Configure to configure the SNS notification plugin.

 

2. Under Post-build Actions at the bottom, click Add post-build action and select Amazon SNS Notifier:

alt

 

3. In the Amazon SNS Notifier form, enter the following values and click Save:

  • Topic ARN: Paste in the Topic ARN from the SNS Topic details page
  • Subject: Leave empty to accept the default subject
  • Message${BUILD_URL}

alt

 

4. Return to the Cloud9 terminal tab, and enter the following to push a new version of the configuration to the build server's Git repository:

Copy code
echo >> main.tf # add a new line to the end of the file
git commit -a -m "Second commit"
git push

 

5. Return to your email client and notice the new build notification email:

alt

You can fully configure the subject and body of the notification emails, but the default values are adequate.

 

6. Open the email and click the link:

alt

You are taken directly to the Jenkins build details page where you can view the logs to understand the issue.

 

Summary

In this Lab Step, you configured the Amazon SNS Notifier plugin for Jenkins to publish build status messages to an SNS topic. You received a build email via the SNS subscription to the build SNS topic where messages are published.

Learning Pathnavigation