AWS Tools for PowerShell

In this step, you will configure your local machine to work with AWS APIs using Powershell or AWS CLI.

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

The AWS Tools for PowerShell let developers and administrators manage their AWS services and resources in the PowerShell scripting environment.

Please note that you can configure Powershell on Windows and macOS, and you can configure AWS CLI on Windows and macOS as well. In this workshop, we will focus on AWS Tools for Powershell, but we will also provide alternative commands for using AWS CLI

Installing AWS Tools for Powershell

In this step, you will install AWS Tools on your local machine.

Windows OS
macOS

Working with Event Engine Accounts

When labs are provisioned using an AWS tool called Event Engine, you will be provided with login credentials for the event, known as a team hash code. In this section, we will walk you through how to log in.

The AWS account is provided free of charge for you, and you only have the permissions needed to complete the labs in this AWS account. The accounts are temporary, and we will delete them after the labs. Make sure you have read and understood the Terms & Conditions.

Navigate to the Event Engine login (https://dashboard.eventengine.run/dashboard) page and enter the team hash code you were provided.

Once logged in, you will be taken to the team dashboard page.

To access the AWS Console for your event, click the AWS Console button, get IAM Access Keys, and use the “Credentials / CLI Snippets” UI.

Configure IAM Keys on your local machine

If using the Event Engine, you can get the AccessKey, SecretKey, and SessionToken from the Event Engine dashboard for the supplied AWS IAM Role. Using your AWS Account, you can use obtain aws_access_key_id and aws_secret_access_key from the IAM Console.

The main difference between the two, the SessionToken parameter, which is only mandatory when using IAM Roles, but when using IAM Users, you only need to configure AWS Secret Key and Access key ID.

Option 1: IAM Keys using Event Engine
Option 2: IAM Keys for Personal/Work account

Verify that you have permissions

Verify your client with:

## windows PowerShell
Get-FSXFileSystem -ProfileName workshop -region eu-west-1

## MacOS CLI
aws fsx describe-file-systems --profile workshop --region eu-west-1

Good output:

PS > Get-FSXFileSystem -ProfileName workshop -region eu-west-1

CreationTime : 4/7/2019 8:38:38 AM
DNSName : fs-08b8d7a080cd06987.domain.name
FailureDetails :
FileSystemId : fs-08b8d7a080cd06987
FileSystemType : WINDOWS
KmsKeyId : arn:aws:kms:eu-west-1:761306897638:key/fd7ea1f9-3a72-4a57-9e06-f7c090248fc5
Lifecycle: AVAILABLE
LustreConfiguration :
NetworkInterfaceIds : {eni-0719ee90e8be02208}
OwnerId : 761306897638
ResourceARN : arn:aws:fsx:eu-west-1:761306897638:file-system/fs-08b8d7a080cd06987
StorageCapacity : 500
SubnetIds : {subnet-00b73284269c627d7}
Tags : {aws:cloudformation:stack-name, aws:cloudformation:logical-id, aws:cloudformation:stack-id,
 ThroughputCapacity...}
VpcId : vpc-00c4f4a70e48874c6
WindowsConfiguration : Amazon.FSx.Model.WindowsFileSystemConfiguration