View Single Post
Old 2016-07-15, 04:20   #9
GP2
 
GP2's Avatar
 
Sep 2003

5·11·47 Posts
Default Setting up an EFS filesystem: make sure you have an instance running with the right permissions

This part will need to be done separately for each AWS region that you use (but for now let's just do one region).

After the previous section, your EFS filesystem has been created, but it's empty. You will need to create a directory structure and populate it with the mprime executable and configuration files. To do that, you will need to log into an instance using an ssh client program. This section makes sure a suitable instance already exists, or launches one if necessary.

Before proceeding make sure you have an ssh client program and know how to use it. A later section will provide some basic information about how to use the popular PuTTY program for Windows.

Go to the EC2 console at http://console.aws.amazon.com/ec2/, then click on the "Instances" link in the left-hand-side menu.

Make sure you are in the same AWS region where you created the EFS filesystem in the previous step, and change it if necessary. The region name is indicated at the top right part of the page.

Do you have any instances already running? If so, click on one of them, and then check the bottom half of the page for the "IAM role". If it has the same value as the IAM instance role mentioned in the "Make sure your IAM instance role exists and it has the right permissions" section above (mprime-instance-role or whatever you named it), then you can use that instance, and skip the rest of this section.

But if you have no instances running, or if those instances have a blank "IAM role" value, you will need to launch a new instance. The easiest thing to do is to launch an on-demand instance of some instance type like t1.micro or t2.micro which is very inexpensive or even free-tier.

To do so, click on the blue "Launch Instance" button.

In the next page, the first line is "Amazon Linux AMI", so just choose that by clicking on the blue "Select button"

In the next page, choose something like t2.nano or t2.micro, or choose one that says "Free tier eligible".

Click on the gray "Next: Configure Instance Details" button.

In the next page, set the following:

Number of instances: keep this at 1

Network: keep the same default VPC id

IAM role: Select the IAM instance role that was configured in the "Make sure your IAM instance role exists and it has the right permissions" section above (mprime-instance-role or whatever you named it).

Keep everything else unchanged, then click on the gray "Next: Add Storage" button

In the next page, do nothing and click on the gray "Next: Tag Instance" button

In the next page, do nothing and click on the gray "Next: Configure Security Group" button

In the next page, under "Assign a security group": change the setting to "Select an existing security group". Do not use one of the "launch wizard" security groups.

Click on the "default" security group.

Click on the blue "Review and Launch" button

In the next page, click on the blue "Launch" button.

In the next page, select "Choose an existing key pair" and in the "Select a key pair" field, select the key pair name that you chose (or created) in the "Make sure that you have a key pair for ssh logins" section above.

Click the "I acknowledge..." check box, and click on the blue "Launch Instances" button.

Wait a minute or two for the instance to finish launching.

At this point, you have an instance running which has the required IAM role (IAM instance role) that allows it to access the EFS filesystem you created in a previous section.


Next section: Setting up an EFS filesystem: run the ssh client program

Last fiddled with by GP2 on 2017-07-30 at 16:40
GP2 is offline   Reply With Quote