Create a QuickSight Visualization
Amazon QuickSight is a Business Intelligence service that allows you to streamline delivery of data insights. Prior to building out a dashboard, you need to prepare QuickSight by creating an account and linking your table from Athena. Using QuickSight, you will build out a dashboard to display responses to site visits on your website.
- Open the QuickSight console.
- If this is your first time accessing QuickSight, you will need to create your QuickSight account.
- You may be prompted to sign up for QuickSight - click Sign up for QuickSight. Ensure that the AWS Account number shown matches your AWS Account. If not, click the log in again link to sign in with the correct account.
- Choose the edition you would like to use. For this lab, the Standard edition is sufficient.
- On the next screen, you will need to configure some options.
- First, select the QuickSight region. This should be the same region you have been operating in for the rest of the lab.
- Enter a QuickSight account name and Notification email address.
- Ensure that the Amazon Athena box is checked. This allows QuickSight to access Athena databases.
- Check the Amazon S3 box, on the screen that follows. Click the tick box next to the bucket you created for this lab, likely called
wa-lab-<your-last-name>-<date>
, also select the Write permission for Athena Workgroup tick box for that bucket. This gives permissions for QuickSight to access data in the S3 bucket and write to the Athena Workgroup used for querying. - Click Finish.
- Click Finish. On the next screen, click Go to QuickSight.

- If this is not your first time using QuickSight, you will need to give QuickSight permission to access log files from your S3 bucket.
- Click on your user icon in the top right corner of the screen.
- Click Manage QuickSight.
- Click Security & Permissions. QuickSight may prompt you to change your region to N. Virginia to do so. Click on the user icon and change your region if needed.
- Under QuickSight access to AWS Services, click Add or remove.
- Tick the tick box next to Amazon Athena. This allows QuickSight to access Athena databases.
- Tick the tick box next to Amazon S3. If S3 is already ticked, click **Details **and then Select S3 buckets.
- Click the tick box next to the bucket you created for this lab, likely called
wa-lab-<your-last-name>-<date>
, also select the Write permission for Athena Workgroup tick box for that bucket. This gives permissions for QuickSight to access data in the S3 bucket and write to the Athena Workgroup used for querying. - Click Finish.
- Click Update.
- Click on the QuickSight logo in the top right corner of the page to return to the QuickSight homepage.
- If you changed your region to N. Virginia to change permissions, switch it back to the region you have been operating in for this lab.
- Now you can create your analysis dashboard. Click the New analysis button in the top left corner of the screen.
- Click the New dataset button in the top left corner of the screen to link your Athena database to QuickSight.
- On the screen that appears, click Athena
- Enter a Data source name, such as
security-lab-log-data
. Leave the Athena workgroup as [ primary ]
. Click Create data source. - In the Choose your table screen, click the dropdown menu and select
security_lab_logs
, the database you created in Athena. In the table selection menu that appears, select security_lab_apache_access_logs
. Click Select.

- In the Finish data set creation screen, select the Directly query your data radio bubble. Click Visualize.
- You should now see a screen similar to the one below.

- Now, you will create a bar graph showing frequency of response types by day. To do so, click on the Vertical bar chart in the Visual types section in the bottom left.
- You will see three Field wells at the top of the page. You will set these fields by dragging and dropping fields from the left side menu into the field wells.
- Set X axis to
request_date
. - Set the Value and Group/Color to
response_code
.

- Your graph should be created similar to the one above. You have now created a graph that displays the count of each response type your page received each day. Since this architecture was deployed for this lab, your graph will be very simple - with only one date on the X Axis.
- Now, you can publish this analysis into a QuickSight dashboard. Click the Share button in the top right corner of the screen. In the dropdown menu, click Publish dashboard.
- Select Publish new dashboard as in the pop-up menu. Enter a name, such as
Security-Lab-CW-Apache-Responses
. Click Publish dashboard.

- This will take you to your new dashboard with a pop-up window to share the dashboard with users. This allows you to send the dashboard to other people. For the purposes of this lab, you can close out of this window by clicking the X in the top right corner.
- You should now see your QuickSight dashboard. This dashboard will be very simple, only containing the one graph created in your analysis. However, this should elucidate the purpose of QuickSight. You are able to communicate important information about your website to a broad audience, all without directly touching the data needed.
Recap: In this section, you built out a QuickSight visualization to display the responses generated by hits on your website. In doing this, you create a digestible source of data and information that anyone can understand. This also demonstrates the security best practices of “analyzing logs centrally” and “keeping people away from data”, as your log files are centrally graphed in QuickSight and the source log data is abstracted from viewers on many levels.