Configure Aerolab for AWS
This page guides you through configuring Aerolab to work with AWS and cloning the repository containing the bulk loading scripts.
Configure Aerolab for AWS
Aerolab needs access to your AWS account to create and manage resources. The configuration depends on how you set up your AWS credentials in the prerequisites.
-
Configure the Aerolab backend for AWS.
Choose the appropriate command based on your AWS credential setup:
Configure Aerolab to use your SSO profile (replace
YOUR_PROFILE_NAMEandYOUR_REGION):Terminal window aerolab config backend --type aws --aws-profile YOUR_PROFILE_NAME --region YOUR_REGIONFor example, to use a profile named
my-sso-profilein theus-west-2region:Terminal window aerolab config backend --type aws --aws-profile my-sso-profile --region us-west-2OK: Config.Backend.Type = awsConfig.Backend.SshKeyPath = /Users/username/aerolab-keys/Config.Backend.AWSProfile = my-sso-profileConfig.Backend.Region = us-west-2Config.Backend.AWSNoPublicIps = falseConfig.Backend.TmpDir = /Users/username/aerolabExample response Make sure your SSO session is fresh before running Aerolab commands. If you see “credentials expired” errors, refresh your session:
Terminal window aws sso login --profile YOUR_PROFILE_NAMEAlternatively, you can set the
AWS_PROFILEenvironment variable and omit the--aws-profileflag:Terminal window export AWS_PROFILE=YOUR_PROFILE_NAMEaerolab config backend --type aws --region YOUR_REGIONIf you configured AWS using
aws configurewith access keys (the default profile), simply set the region:Terminal window aerolab config backend --type aws --region YOUR_REGIONFor example, to use the
us-east-1region:Terminal window aerolab config backend --type aws --region us-east-1OK: Config.Backend.Type = awsConfig.Backend.SshKeyPath = /Users/username/aerolab-keys/Config.Backend.Region = us-east-1Config.Backend.AWSNoPublicIps = falseConfig.Backend.TmpDir = /Users/username/aerolabExample response For detailed configuration instructions, see the Aerolab AWS setup guide.
Ensure your default zone in Aerolab matches the zone where you intend to create your cluster. Using different zones may cause unexpected behavior and connectivity issues between cluster nodes.
Clone the repository
-
Clone the Aerospike Graph repository.
The repository contains the distributed bulk loading sample under
misc/distributed-bulkload-example/AWS:Terminal window git clone https://github.com/aerospike/aerospike-graph.gitcd aerospike-graph/misc/distributed-bulkload-example/AWSCloning into 'aerospike-graph'...remote: Enumerating objects: 2345, done.remote: Counting objects: 100% (2345/2345), done.remote: Compressing objects: 100% (892/892), done.remote: Total 2345 (delta 765), reused 1543 (delta 543)Receiving objects: 100% (2345/2345), 3.45 MiB | 6.78 MiB/s, done.Resolving deltas: 100% (765/765), done.Example response
Review the directory structure
The AWS bulk loading directory contains:
set_variables.sh: Configuration script defining AWS resource names, regions, and pathscreate_cluster.sh: Script to create an Aerospike cluster using Aerolabbulkload.sh: Script to create an EMR cluster and submit the bulk load jobbucket-files/: Directory containing the bulk loader configurationconfig/bulk-loader.properties: Bulk loader configuration file
You will edit these files in subsequent steps to configure your bulk loading pipeline.