Trong phần này, bạn sẽ sử dụng AWS Console để tạo 2 máy ảo Windows EC2 và truy cập từ xa vào chúng.
idevelop
.<powershell>
Set-ExecutionPolicy RemoteSigned -Force
Import-Module AWSPowerShell
$REGION = (ConvertFrom-Json (Invoke-WebRequest -Uri http://169.254.169.254/latest/dynamic/instance-identity/document -UseBasicParsing).Content).region
New-Item -Path c:\temp -ItemType "directory" -Force
powershell.exe -Command Read-S3Object -BucketName aws-codedeploy-$REGION -Key latest/codedeploy-agent-updater.msi -File c:\temp\codedeploy-agent-updater.msi
// Start-Sleep -Seconds 30 *optional
c:\temp\codedeploy-agent-updater.msi /quiet /l c:\temp\host-agent-updater-log.txt
</powershell>
Đây là đoạn script Powershell để tự động tải và cài đặt CodeDeploy Agent cho Windows.
Bạn không cần phải đợi các phiên bản hoàn tất quá trình khởi tạo - hãy tiếp tục các phần sau.