AWS Certified Solution Architect Professional合格体験記
先日AWSのSolution Architect Professionalに無事一発合格したので合格体験記をメモしておきます。
AWS Solution Architect Professionalとは
AWSのSolution Architectのプロフェッショナル資格で、試験時間が3時間というかなりタフな試験です。
Solution ArchitectのAssociateは2019年2月に取得してました。
資格取得後はスマホアプリ関連の仕事が多くAWSからはしばらく離れてましたが、AWS SAAの更新も迫ってたのと資格取得の必要性が迫られる機会があったので、受験することを決めました。
AWS SAAの合格体験記はこちらです。
AWS SA Proの受験料は3万円(税抜)と高額ですが、前回のSAAのときに取得した半額バウチャーがあったので1.5万円で申し込めました。
何を勉強したのか?
まず積ん読になっていたリックテレコムさんのAWS SA Proの参考書籍を2周しました。
GWに1周して最後の模擬試験を解いてみたのですが正答率が50%くらいだったのでこれはまずいと思ったのを覚えています。
そのあと少し間が空いて試験を申し込んだあとに合間を見つけて2周目をやりました。
この参考書だけだと不安だったので、会社のAWS SA Pro保有者に他に何勉強したらいいっすかねって聞いたらkoiwa clubを紹介されたので課金しました。
AWS SA Proの問題は50セット弱あるのですが、時間がなくて結局25セットほどしか解けませんでした...。ここでも正答率はばらつきがあったので正直無理だなーと思って試験当日を迎えました。
どこで試験を受けたのか?
AWSの認定資格はコロナの関係なのか自宅でも受験できるようになっています。
ですがネットでいろいろ調べてみると英語でコミュニケーションを取りながら試験監督に部屋を見せたり、PC環境によってはシステムがハングして再試験になったり、試験環境を満たすために風呂場で受けてる人とかがいたりといろいろめんどくさそうな雰囲気だったので、ちゃんとしたテストセンターで受けることにしました。
以前のAWS SAAのときはネットで評判の高い築地の歌舞伎座テストセンターで受けたのですが、今回は受験予定の日時の候補に出なかったので代わりに高田馬場のテストセンターで受けることにしました。AWSの認定資格の試験のシステムはPSIとピアソンVUEを選べますがPSIを選択しました。確か前回のAWS SAAの時もPSIだったと思います。
試験当日の流れ
本人確認書類としては2つ必要だったので、免許証とパスポートを持っていきました。
PSIってどんな感じだったけと行きの電車でググってトレノケートさんのブログ記事を読んでました。
本人確認書類の確認や試験官とのやりとりを英語で自分でやるの面倒だなぁと思って会場入りしたのですが、実際は写真登録や試験中の監視は会場の担当の人がやってくれたので、本番は試験に集中することができました。
試験は3時間の長丁場になるので直前に再度トイレに行ったり多めに食事をとっていたつもりだったのですが、1時間くらいでエネルギーが切れてお腹が空き、2時間くらいでトイレに行きたくなりました。。。
集中力も切れ切れの中大体2時間30くらいですべての回答を埋め、どうせ落ちてもまた受ければいいやと特に見直しもせずに半分投げやりでサブミットしたら、まさかの合格でした。わーい。
10時に試験開始で当日の18時30ごろに正式なスコアのメールや認定バッチ獲得のメールが届きました。また翌日にはAWS SAAの認定期限の延長の連絡も来ました。
まとめ
以上がAWS SA Proの合格体験記です。勉強方法やPSIの現地テストセンターでの受験を考えている方の参考になればと思います。koiwa clubの有料会員期間がまだあるので、有効活用すべく次はDevOps系の資格を取ろうかな。
flutter build ipaコマンドを使ってみた
flutter 2.0からflutter build ipa
コマンドが利用できるようになったそうなので今更ながら試してみました。
1.22以前のipaのビルド方法
flutterの1.22以前の場合はflutter build ios
コマンドを実行後に、xcodebuild
コマンドでarchiveビルドを実行してexport ipaを実行する必要がありました。
flutterコマンドにもflutter build ipa
はありません。
$ flutter --version Flutter 1.22.6 • channel unknown • unknown source Framework • revision 9b2d32b605 (5 months ago) • 2021-01-22 14:36:39 -0800 Engine • revision 2f0af37152 Tools • Dart 2.10.5 $ flutter build --help Flutter build commands. Global options: -h, --help Print this usage information. -v, --verbose Noisy logging, including all shell commands executed. If used with --help, shows hidden options. -d, --device-id Target device id or name (prefixes allowed). --version Reports the version of this tool. --suppress-analytics Suppress analytics reporting when this command runs. --packages Path to your ".packages" file. (required, since the current directory does not contain a ".packages" file) Usage: flutter build <subcommand> [arguments] -h, --help Print this usage information. Available subcommands: aar Build a repository containing an AAR and a POM file. apk Build an Android APK file from your app. appbundle Build an Android App Bundle file from your app. bundle Build the Flutter assets directory from your app. ios Build an iOS application bundle (Mac OS X host only). ios-framework Produces a .framework directory for a Flutter module and its plugins for integration into existing, plain Xcode projects. Run "flutter help" to see global options.
ipaを作成するコマンドは以前はiosフォルダへ移動してxcodebuildコマンドを実行する必要がありました。
$ flutter build ios --release $ cd ios $ xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos \ -configuration Release archive -archivePath ../build/Runner.xcarchive $ xcodebuild -allowProvisioningUpdates -exportArchive \ -archivePath ../build/Runner.xcarchive \ -exportOptionsPlist ExportOptions.plist -exportPath ../build/ios-release
こらのコマンドの詳細はこちらの記事にまとめています。
flutter build ipaコマンドを試してみる
flutterのバージョンを最新化して新しいコマンドを試してみましょう。
まずはflutterを最新のstableに更新します。
$ flutter --version Flutter 2.2.3 • channel unknown • unknown source Framework • revision f4abaa0735 (9 hours ago) • 2021-07-01 12:46:11 -0700 Engine • revision 241c87ad80 Tools • Dart 2.13.4
flutter build
を見てみるとipaオプションがあることがわかります。
$ flutter build --help Build an executable app or install bundle. Global options: -h, --help Print this usage information. -v, --verbose Noisy logging, including all shell commands executed. If used with "--help", shows hidden options. If used with "flutter doctor", shows additional diagnostic information. (Use "-vv" to force verbose logging in those cases.) -d, --device-id Target device id or name (prefixes allowed). --version Reports the version of this tool. --suppress-analytics Suppress analytics reporting when this command runs. Usage: flutter build <subcommand> [arguments] -h, --help Print this usage information. Available subcommands: aar Build a repository containing an AAR and a POM file. apk Build an Android APK file from your app. appbundle Build an Android App Bundle file from your app. bundle Build the Flutter assets directory from your app. ios Build an iOS application bundle (Mac OS X host only). ios-framework Produces .xcframeworks for a Flutter project and its plugins for integration into existing, plain Xcode projects. ipa Build an iOS archive bundle (Mac OS X host only). web Build a web application bundle. Run "flutter help" to see global options.
また公式ドキュメントを見ると、--export-options-plist
オプションでExportOptionを指定できるようです。
次にflutterの新規プロジェクトを作ってBundle Identiferや証明書、プロビジョニングプロファイルを設定して開発用と配布用両方でビルドコマンドを試してみましょう。
開発用証明書でipaファイルをビルドする
まずは開発用のExportOptions.plistを用意します。ExportOptions.plistはipaを作成するときに毎回作成されているのでそれを参考にするとよいでしょう。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>compileBitcode</key> <true/> <key>destination</key> <string>export</string> <key>method</key> <string>development</string> <key>provisioningProfiles</key> <dict> <key>com.takamiii.flutter.ipa</key> <string>flutteripa</string> </dict> <key>signingCertificate</key> <string>xxxxxxxxxxxxxx</string> <key>signingStyle</key> <string>manual</string> <key>stripSwiftSymbols</key> <true/> <key>teamID</key> <string>xxxxxxxxxx</string> <key>thinning</key> <string><none></string> </dict> </plist>
flutter build
コマンドを実行してみます。
$ flutter build ipa --release --export-options-plist="ios/ExportOptionsDev.plist" Archiving com.takamiii.flutter.ipa... Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxxxxxxx Running Xcode build... └─Compiling, linking and signing... 4.6s Xcode archive done. 30.5s Built /Users/takami228/git/flutteripa/build/ios/archive/Runner.xcarchive. 💪 Building with sound null safety 💪 Building IPA... 7.2s Built IPA to /Users/takami228/git/flutteripa/build/ios/ipa.
無事build配下にipaファイルが作成されました。実機へのインストールや動作確認も問題ありません。
$ tree build/ios/ipa build/ios/ipa ├── DistributionSummary.plist ├── ExportOptions.plist ├── Packaging.log └── flutteripa.ipa 0 directories, 4 files
具体的に何をやっているか--verbose
オプションで詳しく見てみましょう。
$ flutter build ipa --release --export-options-plist="ios/ExportOptionsDev.plist" --verbose [ +92 ms] executing: sysctl hw.optional.arm64 [ +17 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ +6 ms] executing: [/Users/takami228/development/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +14 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H ... [ +4 ms] executing: [/Users/takami228/git/flutteripa/ios/Runner.xcodeproj/] xcrun xcodebuild -project /Users/takami228/git/flutteripa/ios/Runner.xcodeproj -scheme Runner -showBuildSettings ... [ +1 ms] executing: [/Users/takami228/git/flutteripa/ios/] xcrun xcodebuild -configuration Release VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos SCRIPT_OUTPUT_STREAM_FILE=/var/folders/6n/llxh8m296896rymtgjfbkmxw0000gn/T/flutter_tools.soPA6m/flutter_build_log_pipe.ylKQtK/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true COMPILER_INDEX_STORE_ENABLE=NO -archivePath /Users/takami228/git/flutteripa/build/ios/archive/Runner archive ... [ +4 ms] Built /Users/takami228/git/flutteripa/build/ios/archive/Runner.xcarchive. [ +3 ms] 💪 Building with sound null safety 💪 [ ] Building IPA... [ ] executing: xcrun xcodebuild -exportArchive -archivePath /Users/takami228/git/flutteripa/build/ios/archive/Runner.xcarchive -exportPath /Users/takami228/git/flutteripa/build/ios/ipa -exportOptionsPlist /Users/takami228/git/flutteripa/ios/ExportOptionsDev.plist [+7685 ms] Exported Runner to: /Users/takami228/git/flutteripa/build/ios/ipa ** EXPORT SUCCEEDED ** 2021-07-02 14:59:27.762 xcodebuild[16660:579191] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/6n/llxh8m296896rymtgjfbkmxw0000gn/T/Runner_2021-07-02_14-59-27.762.xcdistributionlogs'. ...
中ではxcodebuildのarchiveとexportArchiveを実行してますね、納得です。
配布用証明書でipaファイルをビルドする
続いて配布用のExportOptionでも試してみます。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>destination</key> <string>export</string> <key>method</key> <string>app-store</string> <key>provisioningProfiles</key> <dict> <key>com.takamiii.flutter.ipa</key> <string>flutteripaprod</string> </dict> <key>signingCertificate</key> <string>xxxxxxxxxxxxxx</string> <key>signingStyle</key> <string>manual</string> <key>stripSwiftSymbols</key> <true/> <key>teamID</key> <string>xxxxxxxxxx</string> <key>uploadBitcode</key> <false/> <key>uploadSymbols</key> <true/> </dict> </plist>
こちらも無事ビルドできました。
$ flutter build ipa --release --export-options-plist="ios/ExportOptionsProd.plist" Archiving com.takamiii.flutter.ipa... Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxxxxxxx Running Xcode build... └─Compiling, linking and signing... 4.4s Xcode archive done. 31.2s Built /Users/takami228/git/flutteripa/build/ios/archive/Runner.xcarchive. 💪 Building with sound null safety 💪 Building IPA... 13.2s Built IPA to /Users/takami228/git/flutteripa/build/ios/ipa.
App Store Connectへそのままアップロードする
最後に配布用ビルドでそのままApp Store Connectへアップロードするようにdestinationを
upload`にして実行してみましょう。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>destination</key> <string>upload</string> <key>method</key> ...
なおExportOptionの値の詳細については以下の記事を参考にするとよいです。
変更したplistファイルで実行してみます。
$ flutter build ipa --release --export-options-plist="ios/ExportOptionsProd.plist" Archiving com.takamiii.flutter.ipa... Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxxxxxxx Running Xcode build... └─Compiling, linking and signing... 4.8s Xcode archive done. 30.8s Built /Users/takami228/git/flutteripa/build/ios/archive/Runner.xcarchive. 💪 Building with sound null safety 💪 Building IPA... 82.1s Built IPA to /Users/takami228/git/flutteripa/build/ios/ipa.
無事アップロードが成功しました。
しばらく時間をおいてApp Store Connectを見てみるとアップロードできていることがわかります。
TestFlightで内部テスト配信を設定すると無事実機端末で動作確認ができました。
まとめ
flutter build ipa
コマンドでipaファイルの作成やApp Store Connectへのアップロードまでが自動化できることを確認できました。今までxcodebuild
コマンドを実行していた部分が省略できるのはメリットだと思います。一方で証明書やxcodebuild周りの知識がないとエラーになったときに対処できないので、中の仕組みを理解した上で利用するとよいでしょう。
補足
公式ドキュメントからはflutter build ios
コマンドとxcodebuild
コマンドを組み合わせるやり方は削除されていますが、flutter 2.0以降でも以前の手順で問題なく利用できます。
Firebase App DistributionがApp Bundleに対応したらしいので試してみた(失敗)
先日のGoogle I/OでFirebase App DistributionでのAndoirdアプリの配信でApp Bundle形式での配信に対応したとの発表がありました。今まではapkファイル形式での配信に限られていました。
ちなみにApp Bundleへの対応は2021年の8月以降の新規アプリでは必須の対応となっています。すでにapk形式で配信しているアプリはapk形式での配信は継続できます。
android-developers.googleblog.com
これからはApp Bundleが主流になっていくと思われるので、早速試してみます。
Firebaseのプロジェクトを作成する
Firebase App Distributionを使うFirebaseプロジェクトを作成します。
詳細については以前のブログへの参照としてスキップします。
App Bundleファイルを作成する
今回はAndroid Studioで新規プロジェクトをBasic Activityで作成したものをそのまま使います。
App Bundleファイルの作成はGradle taskのbundleタスクを実行すればよいです。
なおAndroid Studio 4.2からGradle TaskがGradleのビューに出なくなってますが、設定で表示するように変更ができます。
ターミナルで実行する場合は以下のコマンドを実行すればよいです。自分でproduct flavorを定義している場合はbunlde${xxxx}
の形になります。
$ ./gradlew bundle
実行するとapp-debug.aab
、app-release.aab
というファイルがapp/build
配下に生成されます。
$ tree app/build/outputs/bundle app/build/outputs/bundle ├── debug │ └── app-debug.aab └── release └── app-release.aab 2 directories, 2 files
Firebase App Distributionにアップロードする
生成したファイルをFirebase App Distributionへアップロードしてみます。
アップロード画面に行くと以下の注意書きが出てきました。
どうやら開発者登録済みのアカウントでのGoogle Playへのリンクが必要なようです。
開発者登録したアカウントで連携すると無事リンクができましたが、下の方のApp Linkのstatusがオンになりません。
ドキュメントをよく読んでみると、以下の記述がありました。
・The app you upload to Google Play and Firebase must share the same package name.
・The app in Google Play must be in a published state. An app is published when its app store listing has been completed and approved, and the app has been distributed to a following Google Play track: internal, closed, production, or open-testing.
日本語版は以下です。
・Google Play と Firebase にアップロードするアプリのパッケージ名が同じであること。
・Google Play のアプリが公開中であること。「公開中」とは、そのアプリのストアの掲載情報が完成して承認されており、かつそのアプリが Google Play のトラック(内部テスト、クローズド テスト、本番環境テスト、オープンテスト)に配布されていることを言います。
どうやらGoogle Playで公開済みのアプリでないと利用できないようです。ぐぬぬー。
残念ながら私は配信しているアプリを持っていないので検証はここまでしかできませんでした。
Google Play周りの機能を利用するのでGoogle Play側でいろいろ整ってる必要があるようです。なので未公開のアプリを開発版でテスト配信に使う場合はまだまだapkでやる必要がありそうです。
もし業務で利用できる機会があったらまた試してみようと思います。