
The PrestoDB AMI in the AWS Marketplace configures the instance to be both the Presto co-ordinator and a Presto worker to get started easily. Let’s get started.
Step 1 – Subscribe to the PrestoDB Marketplace AMI
- Go to the AWS Marketplace listing https://aws.amazon.com/marketplace/pp/B08BX74CLB/
- Click on “Continue to Configuration“
Step 2 – Launch the AMI from Marketplace
- Pick Amazon Machine Image (AMI) as the delivery method as shown below
- Choose Action to launch the AMI through the Website and pick the recommended instance as shown below
- Create a new security group
- Give the security group a name and description
- Click on “Create a key pair in EC2”. This will open a new window
- Create the new key pair. Download it to be used in the next step
- Refresh the Key Pair Settings section and select the new key pair you created
- Click “Launch”
- The EC2 instance is now launched. Open the EC2 console
Step 3 – Bring up the Presto Console
- Find the public DNS (public IP) of the instance you just launched
- Bring up the PrestoDB Console
http://<PUBLIC_DNS>:8080
Example: http://ec2-18-212-236-171.compute-1.amazonaws.com:8080/
Step 4 – Query using presto-cli
- SSH into the instance using terminal to run queries
- You may require to change the permissions on the pem file that you downloaded
chmod 400 ahana-prestodb.pem
ssh -i keypair.pem ec2-user@<PUBLIC_DNS>
Example: ssh -i ahana-prestodb.pem ec2-user@ec2-18-212-236-171.compute-1.amazonaws.com
- Bring up the presto-cli to query the included datasets. JMX and TPC-DS are included
$ presto-cli
presto> show catalogs;
- Bring up the presto-cli to query the included datasets including presto tpcds
presto> show schemas from tpcds;
- Bring up the presto-cli to query the included datasets
presto> use tpcds.sf1;
presto:sf1> select * from customer limit 10;