All Collections
Data Destinations
Data Lakes
How To Use CloudFormation To Configure Amazon S3, IAM, and Amazon Athena
How To Use CloudFormation To Configure Amazon S3, IAM, and Amazon Athena

Automated setup and configuration with Amazon CloudFormation

Openbridge Support avatar
Written by Openbridge Support
Updated over a week ago

In this guide, we will walk you through the use of CloudFormation (CF) to set up Amazon S3 and IAM for Amazon Athena. The process is quick and simple. Our CloudFormation process is perfect for those who do not want to manually set up Amazon S3, IAM policies, and users. 

If you want to skip CloudFormation and set everything up manually, we outline those activities in “Step 1” here. However, you are here to automate all of this, right? That is what CloudFormation does! Let's get started.

Before We Begin…

Before you begin, get the Openbridge Athena CloudFormation template here. Download to your computer. We will need this template file later. Next, log in to your Amazon account After logging in to select the “CloudFormation” service.

Note: In our screenshot examples, we are showing a new Amazon interface. It may be a bit different on your account depending on if you activate this new UI or not.

Step 1: Create Stack

Select “Create Stack” in the Amazon interface:

Step 2: Upload Your CloudFormation Template

You have a couple of options. The first is to upload your template. This is where you upload the Openbridge Athena CloudFormation template you downloaded from here.

The second option is the Amazon S3 URL. Paste this Amazon S3 URL into the interface:

Either approach will work. It is your preference.

When you are done, select “Next”

Step 3: Configure Your Stack

This is where you set some basic info. First, set a stack name. In our screenshot, we use openbridge-athena-stack. Feel free to use anything that makes sense to you. Next, set the Amazon S3 BucketName. This is where your Athena data will be stored. Last, set a default UserName to be used for access to Amazon S3 and Athena.

Step 4: Optional Configuration

Feel free to set any optional items here. When ready, select “Next”.

Step 5: Review Your Stack

Review your stack. Any changes needed? When ready, select “Next”.

Step 6: Your Stack Is Getting Setup…

You will see your stack getting created. This will take a minute or so to complete.

Once the setup process is done, the status will say CREATE_COMPLETE

Step 7: Save Your Credentials

As part of the setup, we provisioned a user. Under the “Outputs” tab, you will see the AccessKeyforIAMUser, BucketName, and SecretKeyforIAMUser. Take note of the values for each of these. You will need these later when registering your Athena destination within the Openbridge setup process.

That's it! You use CloudFormation to fully automate the setup process of Amazon S3 and IAM for Athena. 

Did this answer your question?