Tooling setup on Windows
Install and configure the .NET 10 SDK, AWS CLI v2 with IAM Identity Center profiles, an AWS Toolkit for your IDE, SAM, CDK, Terraform, a container runtime, Git, Python and an API client.
Assumes: .NET 10 LTS ยท AWS SDK for .NET v4 ยท AWS CLI v2.40 ยท SAM CLI 1.172 ยท CDK CLI 2.1148 ยท Terraform 1.17 ยท Region us-east-1. Verified against official sources on 2026-11-17.
Learning objectives
By the end of this lesson you can:
- Install the course toolchain on Windows with
winget, and verify every tool from a terminal. - Configure AWS CLI v2 with an
sso-sessionand three named profiles, sign in withaws sso login, and sign out. - Connect the AWS Toolkit in Visual Studio, VS Code or Rider to the same profiles.
- Explain the Docker Desktop licence terms and choose a free alternative if they do not fit you.
- Diagnose the most common "it worked yesterday" credential problems.
Prerequisites
- Secure your AWS account: you need your AWS access portal URL, the sandbox and management account IDs, and the permission set names.
- Windows 10/11 with
winget(App Installer, included in current Windows). Some installers need administrator rights.
Why this matters in banking
Most real credential leaks start on developer machines: keys in appsettings.json, a credentials file synced to a personal cloud drive, a token pasted into a ticket. A bank's developer workstation standard therefore says how you authenticate as much as what you install. Learning to work only with short-lived, browser-issued credentials from day one means you never have to unlearn the habit of copying access keys around.
The idea in plain language
You need three kinds of tools:
- Build tools โ .NET 10 SDK, Git, Python, Node.js (for the CDK CLI).
- AWS tools โ the AWS CLI (talks to AWS from a terminal), an AWS Toolkit in your IDE, the SAM CLI (serverless), the CDK CLI and Terraform (infrastructure as code).
- Local runtime tools โ a container runtime (Docker Desktop or an alternative) and an API client (Bruno or VS Code REST Client).
All AWS tools read the same two files: %USERPROFILE%\.aws\config (profiles, Regions, SSO settings โ safe to look at) and %USERPROFILE%\.aws\credentials (long-lived keys โ you will leave this empty). A profile is a named combination of account + role + Region. You sign in once with aws sso login, and every tool that uses that profile gets temporary credentials.
Analogy: The
configfile is the list of branches and rooms you are allowed into.aws sso loginis tapping your badge at the front door in the morning. The CLI, SDK and IDE are the internal doors โ they check the badge you already tapped, and it stops working at the end of your shift.
What problem each tool solves
| Tool | Why you need it | Notes and limitations |
|---|---|---|
| .NET 10 SDK | Build and run C# labs | LTS, supported until 2028-11-14. Labs pin it with global.json |
| AWS CLI v2 | Every AWS API from a terminal; SSO sign-in for all other tools | Needs 2.22.0+ for PKCE sign-in and 2.32.0+ for aws login |
| AWS Toolkit (VS / VS Code / Rider) | Browse resources, deploy, view logs from your IDE | Uses the same profiles as the CLI |
| AWS SAM CLI | Build, test locally and deploy Lambda/serverless apps | sam local needs a container runtime |
| AWS CDK CLI | Deploy infrastructure written in C# | Needs Node.js; the CLI version (2.1xxx) is separate from the Amazon.CDK.Lib NuGet version (2.2xx) |
| Terraform | The other main IaC tool in banks | Business Source Licence since 1.6 โ free to use for your own infrastructure |
| Container runtime | Run containers, SAM local, Testcontainers, emulators | Docker Desktop has licence conditions (below) |
| Git | Version control | Configure line endings and credential manager |
| Python 3 | Glue/PySpark and some automation in later modules | Basics only |
| Bruno or REST Client | Send HTTP requests to APIs you build | Both store requests as plain text files you can commit |
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
Azure CLI (az) | AWS CLI v2 (aws) | Profiles in %USERPROFILE%\.aws\config, not subscriptions selected with az account set |
az login | aws sso login | One sign-in per sso-session covers all profiles that use it |
| Azure Tools / Azure Toolkit in VS and Rider | AWS Toolkit for Visual Studio, VS Code, JetBrains | Same profiles as CLI and SDK |
| Azure Functions Core Tools | AWS SAM CLI | sam local invoke runs your function in a container |
| Bicep CLI | AWS CDK CLI (C#) / CloudFormation | CDK synthesises CloudFormation templates |
| Azurite / Cosmos emulator in Docker | AWS Emulator, DynamoDB Local, LocalStack (Local practice) | All need a container runtime on Windows |
DefaultAzureCredential | SDK default credential chain + profiles | Environment variables beat profiles โ a common source of surprises |
Architecture
How sign-in flows to every tool:
Security-boundary view: the token cache and any temporary keys live in your user profile. Never sync %USERPROFILE%\.aws to a cloud drive, never commit it and never paste its contents anywhere.
Step-by-step implementation
Install the toolchain with winget
Open Windows Terminal (PowerShell). Package IDs below were checked against the official microsoft/winget-pkgs repository on 2026-11-17.
# Core
winget install --id Microsoft.DotNet.SDK.10 -e
winget install --id Git.Git -e
winget install --id Amazon.AWSCLI -e
# AWS developer tools
winget install --id Amazon.SAM-CLI -e
winget install --id OpenJS.NodeJS.LTS -e # needed for the CDK CLI
winget install --id Hashicorp.Terraform -e
# Python (basics only in this course)
winget install --id Python.Python.3.14 -e
# API client (choose one; REST Client is a VS Code extension instead)
winget install --id Bruno.Bruno -eClose and reopen the terminal so PATH changes apply, then install the CDK CLI with npm:
npm install -g aws-cdkInstall a container runtime
Docker Desktop and the alternatives use WSL 2 on Windows. If you have never enabled it, run this in an administrator terminal and reboot:
wsl --installThen choose one runtime:
# Docker Desktop โ check the licence terms below first
winget install --id Docker.DockerDesktop -e
# Free, open-source alternatives
winget install --id RedHat.Podman-Desktop -e
winget install --id SUSE.RancherDesktop -eDocker Desktop licence (checked 2026-11-17 on docs.docker.com): free for personal use, education, non-commercial open-source projects and small businesses (fewer than 250 employees AND less than USD 10 million annual revenue). Studying on your own PC for your own development counts as personal use. Using Docker Desktop for your bank's work โ on a work laptop or for work projects โ needs a paid subscription from your employer. If in doubt, use Podman Desktop or Rancher Desktop, or AWS's open-source Finch (installer on the Finch releases page; the SAM CLI supports it). Labs in this course work with any Docker-compatible runtime.
Install your IDE and the AWS Toolkit
# Visual Studio Community 2026 (version 18.x) โ free for individual developers
winget install --id Microsoft.VisualStudio.Community -eThen Extensions โ Manage Extensions โ search "AWS Toolkit for Visual Studio". The Marketplace listing states it supports Visual Studio 2022 and 2026 (version 1.109.0.0 on 2026-11-17). After restarting, open View โ AWS Explorer, choose the learn-sandbox profile and Region us-east-1. If the profile shows as expired, run aws sso login in a terminal and refresh.
Configure the AWS CLI with an sso-session
Run the wizard. Use your access portal URL from IAM Identity Center โ Dashboard.
PS> aws configure sso
SSO session name (Recommended): cea
SSO start URL [None]: https://d-1234567890.awsapps.com/start
SSO region [None]: us-east-1
SSO registration scopes [None]: sso:account:accessA browser opens; sign in with your Identity Center user and MFA and approve the request (the client name starts with botocore-client-). Choose the cea-sandbox account and SandboxAdmin role, then:
Default client Region [None]: us-east-1
CLI default output format (json if not specified) [None]: json
Profile name [111122223333_SandboxAdmin]: learn-sandboxRun aws configure sso twice more (reusing session name cea) to create learn-management (ManagementAdmin) and learn-billing (BillingViewer). Your config file now looks like this:
[sso-session cea]
sso_start_url = https://d-1234567890.awsapps.com/start
sso_region = us-east-1
sso_registration_scopes = sso:account:access
[profile learn-sandbox]
sso_session = cea
sso_account_id = 111122223333
sso_role_name = SandboxAdmin
region = us-east-1
output = json
[profile learn-management]
sso_session = cea
sso_account_id = 444455556666
sso_role_name = ManagementAdmin
region = us-east-1
output = json
[profile learn-billing]
sso_session = cea
sso_account_id = 444455556666
sso_role_name = BillingViewer
region = us-east-1
output = jsonThere is no [default] profile on purpose: every command must name the account it targets. That one habit prevents "I ran it in the wrong account" incidents.
Sign in, check, sign out
# One sign-in for every profile that uses sso-session "cea".
aws sso login --sso-session cea
# Who am I in the sandbox?
aws sts get-caller-identity --profile learn-sandbox
# End of the day: delete cached tokens.
aws sso logoutExpected output of get-caller-identity (IDs fictional):
{
"UserId": "AROAEXAMPLEROLEID1234:alex.learner",
"Account": "111122223333",
"Arn": "arn:aws:sts::111122223333:assumed-role/AWSReservedSSO_SandboxAdmin_0a1b2c3d4e5f6a7b/alex.learner"
}Path B only: sign in with aws login
On the single-account Free plan path, attach the AWS managed policy SignInLocalDevelopmentAccess to your IAM user (plus the permissions you need), then:
aws login --profile learn-sandbox
aws sts get-caller-identity --profile learn-sandbox
aws logout --profile learn-sandboxThis writes login_session = arn:aws:iam::111122223333:user/alex to the profile and caches short-lived credentials under %USERPROFILE%\.aws\login\cache. .NET apps need the AWSSDK.Signin package to use such a profile โ the lab already references it.
Configure Git safely
git config --global user.name "Alex Learner"
git config --global user.email "alex@example.com"
git config --global core.autocrlf true
git config --global init.defaultBranch mainAdd .aws/, *.pem, .env and appsettings.*.local.json to every repository's .gitignore. Consider a pre-commit secret scanner (Module 5 covers this).
Verify every tool
dotnet --list-sdks # expect a 10.0.x SDK
aws --version # expect aws-cli/2.x
sam --version
node --version
cdk --version
terraform -version
python --version
git --version
docker version # or: podman versionAWS Console instructions
The only console steps here are in IAM Identity Center โ Dashboard (copy the AWS access portal URL) and โ Settings (check the Identity Center Region). Everything else happens on your PC.
AWS CLI
Useful profile and credential commands:
# List configured profiles.
aws configure list-profiles
# Show where each setting for a profile comes from (env var, config file...).
aws configure list --profile learn-sandbox
# Use a profile for a whole PowerShell session (avoid making this permanent).
$env:AWS_PROFILE = "learn-sandbox"
Remove-Item Env:AWS_PROFILE # undo
# Print temporary credentials for tools that cannot read SSO profiles (they expire).
aws configure export-credentials --profile learn-sandbox --format powershellInfrastructure as Code
Not applicable โ this lesson installs tools. The CDK and Terraform CLIs you installed are used from Cost guardrails onwards; both use the learn-* profiles (cdk deploy --profile learn-sandbox, profile = "learn-sandbox" in the Terraform provider).
Complete code
A global.json pins the SDK for every lab so builds are repeatable:
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}The first full C# program is in the verify-setup lab.
Code explained line by line
Walking through the config file:
[sso-session cea]โ a reusable sign-in definition. Signing in once forceacovers every profile that references it, and the CLI and SDKs can refresh the token automatically.sso_start_urlโ your access portal URL; it identifies your Identity Center instance.sso_region = us-east-1โ the Region where Identity Center lives, not necessarily where you deploy.sso_registration_scopes = sso:account:accessโ the OAuth scope needed to list accounts and roles.[profile learn-sandbox]โ a named profile. Tools select it with--profile learn-sandboxorAWS_PROFILE.sso_account_idandsso_role_nameโ which account and which permission set to use.region = us-east-1โ default Region for API calls made with this profile.
And global.json: version + rollForward: latestFeature accepts any 10.0 SDK at or above 10.0.100; the test.runner setting makes dotnet test use Microsoft.Testing.Platform, which the course's xUnit v3 test projects require.
Security considerations
- Keep
%USERPROFILE%\.aws\credentialsempty. If an old tutorial left keys there, delete the keys in AWS (IAM โ Users โ Security credentials) and then the file entries. - Remove
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYandAWS_SESSION_TOKENfrom your environment variables. They take precedence over profiles in the SDK and CLI credential chain and silently override SSO. - Run
aws sso logoutat the end of the day and before lending or repairing your PC. aws configure export-credentialsprints live temporary keys โ never paste that output anywhere.
โ Learning shortcut โ not for production
Installing tools globally with winget and npm is fine for a personal machine. In a bank, workstations are managed: tools come from an approved software catalogue with pinned versions, package sources are internal mirrors, and the AWS CLI is often pre-configured to use the corporate identity provider through IAM Identity Center. Check your organisation's standards before installing anything on a work device.
Banking use case
At "Harbour Bank" (fictional), the platform team publishes a signed aws-config snippet that defines one sso-session and a profile per environment, named hb-dev, hb-test, hb-prod-readonly. Production profiles map to read-only permission sets; deployments to production happen only from the CI/CD pipeline, which uses OIDC federation rather than people's credentials (Module 9). Developer laptops have no [default] profile, so a forgotten --profile fails instead of hitting production.
Common mistakes
- Opening the same old terminal after installing โ
awsordotnet"not recognised" โ close and reopen the terminal to reloadPATH. - Creating a
[default]profile pointing at an admin role โ convenient โ commands without--profilego somewhere powerful. Name every profile. - Using
aws configure(keys) instead ofaws configure ssoโ older tutorials โ creates long-lived keys in the credentials file. - Setting
AWS_PROFILEpermanently withsetxโ forgotten months later โ confusing behaviour in every tool. Set it per session. - Choosing the deployment Region as
sso_regionโ they look similar โsso_regionmust be the Identity Center Region. - Using Docker Desktop for work projects without a licence โ it is free at home โ check the terms or use an alternative.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Error when retrieving token from sso: Token has expired and refresh failed | Identity Center session ended (default 8 hours) | aws sso login --sso-session cea |
The config profile (learn-sandbox) could not be found | Typo or profile not created | aws configure list-profiles; rerun aws configure sso |
Unable to locate credentials | No --profile and no default | Add --profile learn-sandbox |
| Command runs against the wrong account | AWS_PROFILE or AWS_ACCESS_KEY_ID set in the environment | Get-ChildItem Env:AWS* and remove stray variables |
| Browser does not open during sign-in | Remote session or blocked browser | Copy the printed URL into a browser on the same machine; or use --use-device-code |
docker: command not found / daemon not running | Runtime not started or WSL 2 missing | Start Docker/Podman Desktop; run wsl --status |
cdk not found after npm install | npm global folder not on PATH | Reopen the terminal; check npm config get prefix |
winget reports "No package found" | Package ID changed | winget search <name> and use the current ID |
Cost and cleanup
Cost: USD 0. All tools are free for personal learning (check Docker Desktop and Rider terms for work use). No AWS resources are created.
Cleanup: sign out at the end of each session.
aws sso logoutExercises
- ๐ข Guided: Install everything, create the three profiles, sign in once and run
aws sts get-caller-identityagainst each profile. Note which account each one returns. - ๐ก Challenge: Set
AWS_PROFILE=learn-managementin a session, then runaws sts get-caller-identity --profile learn-sandbox. Which wins? Then set fakeAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYvalues and run it again. Explain both results, then clean up the variables. - ๐ด Live problem: A teammate says: "The AWS Toolkit in Visual Studio says my credentials are invalid, but the CLI works fine." List the five most likely causes and how you would check each without seeing their screen.
Assignment
Write docs/workstation.md in your learning-journal repository: the tools and versions you installed, your profile names and what each is for (no account IDs or URLs), and the commands you run at the start and end of every study session.
Solutions
learn-sandbox returns account 111122223333 with role AWSReservedSSO_SandboxAdmin_โฆ; learn-management and learn-billing return 444455556666 with the ManagementAdmin and BillingViewer roles. One aws sso login --sso-session cea was enough for all three. Why: the token belongs to the session; each profile exchanges it for credentials of a different role.
--profile on the command line beats AWS_PROFILE, so you get the sandbox. But with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set, the CLI uses them instead of the profile's SSO configuration and the call fails with an invalid-token error (the fake keys are not real). Remove them with Remove-Item Env:AWS_ACCESS_KEY_ID, Env:AWS_SECRET_ACCESS_KEY, Env:AWS_PROFILE. Why: environment credentials sit early in the credential chain. Stray variables are the most common cause of "wrong account" mysteries.
- The Toolkit is set to a different profile or Region than the CLI โ check the profile selector. 2. The Identity Center session expired and the Toolkit has not refreshed โ run
aws sso loginand refresh the explorer. 3. Visual Studio was started before environment variables changed, or it inherits strayAWS_*variables โ restart VS from a clean terminal. 4. An oldcredentialsfile entry with the same profile name overrides SSO โ inspect%USERPROFILE%\.aws\credentials. 5. An outdated Toolkit version that does not handlesso-sessionprofiles โ update the extension. Why: the CLI and the Toolkit read the same files but run in different processes with different environments.
Knowledge check
Answer: sso_region is where IAM Identity Center lives (used for sign-in). region is the default Region for API calls made with that profile.
Answer: So every command must name its target account explicitly. A missing --profile then fails safely instead of acting on an unexpected account.
Answer: No. It is free for personal use, education, non-commercial open source and small businesses (fewer than 250 employees and less than USD 10 million revenue). A bank needs a paid subscription, or teams can use an open-source alternative such as Podman, Rancher Desktop or Finch.
Interview questions
- "How do developers authenticate to AWS at your company?" โ Through IAM Identity Center federated with the corporate IdP; CLI profiles with
sso-session; no IAM users or long-lived keys; pipelines use OIDC roles. - "Explain the AWS SDK credential chain." โ The SDK looks for credentials in order: explicit code, environment variables, shared config/credentials profiles (including SSO, login and process credentials), container credentials, then instance metadata. The first match wins, which is why stray environment variables override profiles.
Certification practice
A developer needs to call AWS APIs from a local .NET application during development. Company policy forbids long-lived credentials on laptops. Which approach meets the requirement?
A. Create an IAM user with access keys and store them in appsettings.Development.json
B. Configure an IAM Identity Center profile with aws configure sso and sign in with aws sso login; the SDK resolves temporary credentials from the profile
C. Store access keys in environment variables and rotate them every 90 days
D. Use the root user's access keys only on the developer laptop
Answer: B. Identity Center issues short-lived credentials and the SDK reads the SSO profile. A and C still use long-lived keys (C only shortens their life). D is never acceptable.
Which of the following lets a developer manage AWS resources from inside Visual Studio?
A. AWS CloudShell B. AWS Toolkit for Visual Studio C. AWS Systems Manager Session Manager D. Amazon Q in the AWS Management Console
Answer: B. The Toolkit is the IDE extension. CloudShell is a browser-based shell; Session Manager connects to instances; the console assistant runs in the browser.
Completion checklist
- All tools install and print a version
-
%USERPROFILE%\.aws\confighas onesso-sessionand threelearn-*profiles; the credentials file has no keys -
aws sts get-caller-identity --profile learn-sandboxreturns the sandbox account - My IDE's AWS Toolkit shows the sandbox account's resources
- I chose a container runtime whose licence fits my use
Key takeaways
wingetinstalls the whole toolchain; reopen the terminal afterwards.- One
sso-session+ named profiles +aws sso logingives every tool short-lived credentials. - No
[default]profile, no keys in the credentials file, noAWS_*key variables in your environment. - The AWS Toolkits for Visual Studio, VS Code and Rider use the same profiles as the CLI.
- Docker Desktop is free for personal study, not for large-company work; Podman, Rancher Desktop and Finch are free alternatives.
Further reading
- Installing the AWS CLI
- Configuring IAM Identity Center authentication with the AWS CLI
- Login with console credentials (
aws login) - AWS SDK for .NET v4 โ single sign-on and authentication
- AWS Toolkit user guides: Visual Studio, VS Code, JetBrains
- Installing the AWS SAM CLI
- Getting started with the AWS CDK
- Install Terraform
- Docker Desktop licence agreement summary
- winget documentation and .NET 10 downloads
Independent learning resource โ not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.
Cost guardrails: budgets, alarms and the usual traps
Set up a zero-spend budget, a small monthly budget, a billing alarm, Cost Anomaly Detection and Free Tier alerts, and learn which resources quietly cost money.
Zero-cost local practice
Practise AWS APIs on your own PC with AWS Emulator, LocalStack, DynamoDB Local, SAM local, Testcontainers and docker compose โ and know exactly what local emulation cannot prove.