aws-samples/aws-modern-application-workshop

Windows 10 notes

Opened this issue · 1 comments

Windows 10 comes with PowerShell 5.1
Using AWSPowerShell.NetCore

Setting up your PS environment.
-From the AWS_MC create an IAM user:
https://github.com/awsdocs/aws-powershell-user-guide/blob/master/doc_source/pstools-appendix-sign-up.md
-Once you have your AccesKey and SecretKey store them in the ASWCredential default:
Set-AWSCredential -AccessKey YourAccesKey -SecretKey YourSecretKey -StoreAs default

Another useful command:
Set-DefaultAWSRegion Your region (ex. us-west-2, no quotes)

Module-1
Deploy-Frontend.ps1
Line 19 change to '-ge 5'

Also in Deploy-Frontend.ps1 the build section does not work.

Fails with”

ng-mythical-mysfits@0.0.0 build E:\DevProj\Trng\aws-modern-application-workshop\module-1\frontend
./node_modules/@angular/cli/bin/ng build "--prod"
'.' is not recognized as an internal or external command,

Before running the script from the frontend folder run 'npm update' and then 'ng build'.
Comment the following.
#Write-Output "Checking if Node.js is installed on this machine..."
#Start-Process node -ArgumentList @('--version') -Wait
#Start-Process -WorkingDirectory $frontEndPath npm -ArgumentList @('install') -Wait -NoNewWindow
#Start-Process -WorkingDirectory $frontEndPath npm -ArgumentList @('run build -- --prod') -Wait -NoNewWindow

Module-2
Testing the Service Locally
Use localhost:8080: localhost:8080/api/mysfits

ps1 folder scripts
comment out following:
#try {
# $IsMacOS
#}
#catch {
# $IsMacOS = $false
#}
#If ($IsMacOS) {
# Import-Module AWSPowerShell.NetCore
#}
#Else {
# Import-Module AWSPowerShell
#}

add Import-Module AWSPowerShell.NetCore

f00f commented

If you are on the dotnet branch, see also #132 and #133 for required changes to RegisterECSTaskDefinition.ps1 and CreateCodePipeline.ps1. This may or may not apply to other branches.