How to Setup Leapp on Windows with WSL
Problem
You want to set up local AWS credentials but the primary documentation refers to MacOS and Homebrew. Leapp and Geodesic are supported in Windows using WSL. Please see the Solution below.
Solution
- Install latest version of Docker Desktop, Leapp, AWS CLI, WSL (Ubuntu 22)
-
Optional but useful to debug, install the AWS CLI in WSL
-
Start Docker Desktop
-
Launch Leapp UI and connect to Chained Role session
Please see How to Log into AWS, skipping all requirement steps. After you've connected to your identity profile via the Chained Role session, continue with the remaining steps here.
- Find your home directory for Windows.
Most likely this is C:\Users\YOUR_NAME
. Open WSL and run the following:
explorer.exe .
- Copy
.aws
from Windows Home to WSL home
In Powershell copy .\.aws\
to the your local WSL home path found above.
For example:
PS C:\Users\dan> cp -r .\.aws\ \\wsl.localhost\Ubuntu-22.04\home\dan
- Open WSL and verify your identity
dan@WSL:~$ aws sts get-caller-identity --profile acme-identity
{
"UserId": "xyz:acme-identity",
"Account": "123",
"Arn": "arn:aws:sts::111111111111:assumed-role/acme-core-gbl-identity-devops/acme-identity"
}
-
Clone and navigate to
infrastructure
directory -
Build your Geodesic image:
make all
- Done!
In Geodesic you should see the green checkmark next to your profile. You can also verify with aws sts
:
⧉ acme
√ : [acme-identity] (HOST) infrastructure ⨠ aws sts get-caller-identity
{
"UserId": "AROAXYKJQXXXXXXXXXXXX:acme-identity",
"Account": "111111111111",
"Arn": "arn:aws:sts::111111111111:assumed-role/acme-core-gbl-identity-devops/acme-identity"
}