AWS Command Line

[Lab] Setting Up the AWS Environment for Working with DynamoDB

DynamoDB is an AWS service and hence you need to have an AWS account setup first. For setting up AWS account and basic configurations within AWS, please refer to getting-started-with-aws-part-1-iam-and-storage-services. Better use a dedicated user account for this section, or cleanup everything before and after the section. Next you will need to do some configurations within your system, and some of these steps might be specific to your OS (OSX, Windows, Linux etc.).

[Lab] Getting EC2 Instance Metadata from AWS Command Line

AWS provides us with many variables which we can use in many cases. We can combine this with the bootstrap bash script to write various information to s3 or other locations.

 

Steps

  1. Login to AWS console and go to IAM:

    1. Go to Roles (side menu)

    2. Create a role:  Give any name, select role type as Amazon EC2, Attach following policies: AmazonS3FullAccess.

  2. Go to EC2:

[Lab] Configuring EC2 Bootstrap Script Using Bash Scripting

 You can run any script while starting an EC2 instance. Here we will run script to install apache server, copy the index.html from s3 to the html folder of apache server, and finally start apache httpd server.

 

Steps

  1. Create an index.html file (refer to previous labs).

  2. Login to AWS console and go to S3.

[Lab] Using IAM Roles Instead of Configuring Credentials from AWS Command Line in EC2

Amazon Linux AMI comes with aws command line pre-installed, and we will use it for out lab. You may have to install it manually in other AMIs. You can install AWS command line in our personal devices as Windows, Mac etc.

 

Steps

  1. Login to AWS console and go to IAM:

    1. Go to Roles (side menu)

[Lab] Configuring Access Key Id and Secret Access Key from AWS Command Line Inside EC2

Amazon Linux AMI comes with aws command line pre-installed, and we will use it for out lab. You may have to install it manually in other AMIs. You can install AWS command line in our personal devices as Windows, Mac etc.