This Cloudformation and script can be used to deploy an Elastic Map Reduce (EMR) cluster with an authenticated reverse proxy for access to Livy.
** This template has been tested in AWS Academy Associate Learner Lab accounts.** It is designed for use in Learner Lab accounts, which have restricted privileges.
- Clone this repository
- Modify
emr-course.yml
template. Set theDefault:
value in theBootstrapProxyScript:
parameter so that it references the URL of the bootstrap script in your repository. - Optionally, specify additional bootstrap scripts in the
BootstrapMasterAdditionsScript
andBootstrapOtherAdditionsScript
default fields. - Commit and push updates to your repo.
- Share the template with students.
-
After logging into your AWS account, go to the AWS CloudFormation Console: https://console.aws.amazon.com/cloudformation
-
Click the Create Stack Button and select with new resources (standard)
-
In the Specify template section, select Upload a template file and upload the
emr-course.yml
template that was published to your repository. Click Next. -
Under Stack name enter
emr-course
(or another descriptive name) -
Under Parameters, pre-populated fields can be left as-is but you must select a VpcId, VPC Public Subnet, and existing EC2 Key Pair. Additionally, enter a Username and Password that will be used to authenticate to the Livy Proxy. Click Next.
-
On the Configure stack options page, leave defaults as-is. Scroll to the bottom and click Next.
-
Scroll to the bottom of the Review page, select the checkbox acknowledgement in the Capabilities section at the bottom, then click Create stack
-
Monitor the stack for any errors during creation. When the stack status changes to
CREATE_COMPLETE
you can select the Outputs tab in the stack details to retrieve the DNS address of the master node. Clicking this URL should prompt for the Livy credentials.Note: If the request times out, wait up to 5 minutes and try again. The EMR Step that configures the proxy might not have executed yet.
- In the EMR Console (https://console.aws.amazon.com/elasticmapreduce), go to the cluster and select the Steps tab. Verify that the BootstrapLivyProxy step completed. If not, review the logs.