最後!!
まずは少し設定しないと行けないのでWorkSpacesへと移動します
ADと検索でActive Directoryを選択
CloudFormationで作成されたADを選択
アプリ及びサービスの項目でWorkSpcaesを選択
移動さきはこんな感じ
WorkSpacesの項目を選択してWorkSpacesの起動をクリック
サブネットを選択します。
ここではVPC編で作成したルートテーブルに紐づくパブリックサブネットでいいです
次のステップを選択(念のため作成されたADを使用しているか確認するのもいいかと)
準備は以上です。
今回したかったことは
ADをWorkSpacesに紐づけるのとサブネットを登録する必要があったこと、そしてユーザーを一人追加する必要があります。
さてCloudFormationに戻ってきましょう
その1
WorkSpaces.yamlを選択
いろいろ設定します
OwnBnadleIdはなくてもOK
いろいろ設定はデフォでスタックの作成を実行
完成!!
完成後に起動
次のようなメールが届きますのでWorkSpacesを起動しましょう。
パスワード設定
クライアントソフトをダウンロード
アプリを起動してパスワードを入力
動いた!!
共有フォルダ(FSx)にアクセスできるか確認!!
ファイル作成ができるか確認!!
¥¥amznfsxorunjwor.sample.example.com¥share
これでリモート環境はできました!!
お疲れ様です
ソースコードの確認
AWSTemplateFormatVersion: "2010-09-09"
Description: "Create Workspaces"
Mappings:
WSTypeMap:
Standard-with-Windows-10-Japanese:
BundleId: wsb-0ngbndd5g
Value-with-Windows-10-Japanese:
BundleId: wsb-gwwsvq6xr
Performance-with-Windows-10-Japanese:
BundleId: wsb-dk55sygy0
Parameters:
WorkstationType:
AllowedValues:
- Standard-with-Windows-10-Japanese
- Value-with-Windows-10-Japanese
- Performance-with-Windows-10-Japanese
Description: Select the type of workstation
Default: Standard-with-Windows-10-Japanese
Type: String
OwnBundleId:
Type: String
MinLength: '0'
MaxLength: '63'
Default: ""
AllowedPattern: "(^$|^wsb-[0-9a-z]*$)"
ConstraintDescription: BundleId format is blank or wsb-[alphanumeric characters]. Min characters 8, Max characters 63.
UserVolumeSizeGibValue:
Type: "Number"
Default: 50
AllowedValues:
- 10
- 50
- 80
RootVolumeSizeGibValue:
Type: "Number"
Default: 80
AllowedValues:
- 80
# 前提:事前にuserが作成済み(コンソールから作成)
UserNameValue:
Type: "String"
MinLength: '1'
MaxLength: '63'
Default: "username"
AllowedPattern: "[a-zA-Z][a-zA-Z0-9]*"
ConstraintDescription: must use only alphabet characters. Min 1 Max 63.
PJPrefix:
Description: Enter a prefix of this system.
Type: String
Default: "test"
AllowedPattern: "[a-zA-Z][a-zA-Z0-9][ -~]*"
ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
Conditions:
WSBundleId: !Equals [ !Ref OwnBundleId, "" ]
Resources:
WorkSpacesWorkspace:
Type: "AWS::WorkSpaces::Workspace"
Properties:
DirectoryId: { "Fn::ImportValue": !Sub "${PJPrefix}-windows-ad" }
UserName: !Ref UserNameValue
BundleId:
Fn::If: [ WSBundleId,
!FindInMap [
WSTypeMap,
!Ref WorkstationType,
BundleId
],
!Ref OwnBundleId
]
RootVolumeEncryptionEnabled: false
UserVolumeEncryptionEnabled: false
WorkspaceProperties:
RunningMode: "AUTO_STOP"
RunningModeAutoStopTimeoutInMinutes: 60
RootVolumeSizeGib: !Ref RootVolumeSizeGibValue
UserVolumeSizeGib: !Ref UserVolumeSizeGibValue
ComputeTypeName: "STANDARD"
Tags:
- Key: Name
Value: !Sub ${PJPrefix}-WS
Outputs:
WorkSpaces:
Value: !Ref WorkSpacesWorkspace
Export:
Name: !Sub ${PJPrefix}-windows-ws