LoginSignup
0
0

More than 1 year has passed since last update.

CodeBuild operational notification 対応

Posted at

課題

AWS から CodeBuild operational notification が届きました。

We are reaching out to you because you ran a build using the Ubuntu standard 4.0 [1] Docker Image, in the last 30 days.
Starting March 30, 2023, AWS CodeBuild will be moving these images to an unsupported status and they will not be cached on the build hosts anymore.

You may continue using these images for your builds, but will notice an increase in provisioning latency after March 30, 2023.
These images will also not be getting any new updates. We recommend updating your Build Projects to use the latest build images in order to get the latest language runtimes and tools. For more information on how to do this you can follow 'Docker images provided by CodeBuild' [2].

If you have any questions or concerns, please reach out to AWS Support [3].

[1] Platform: Ubuntu 18.04 - Image: aws/codebuild/standard:4.0 - Definition: ubuntu/standard/4.0
[2] https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
[3] https://aws.amazon.com/support

「誰だ君は?」ということで日本語訳も載せておきます。

過去30日以内にUbuntu standard 4.0 [1] Docker Imageを使用してビルドを実行したため、ご連絡を差し上げました。
2023年3月30日から、AWS CodeBuildはこれらのイメージを非サポート状態に移行し、ビルドホスト上にキャッシュされなくなります。

これらのイメージをビルドに使用し続けることはできますが、2023年3月30日以降、プロビジョニングのレイテンシーが増加することに気がつくでしょう。
また、これらのイメージは新しいアップデートがされなくなります。最新の言語ランタイムとツールを利用するために、ビルドプロジェクトを更新して最新のビルドイメージを使用することをお勧めします。この方法の詳細については、「CodeBuildが提供するDockerイメージ」[2]を参照してください。

ご質問やご不明な点がございましたら、AWSサポートまでご連絡ください[3]。

書いてある通りですが、 Ubuntu18 のイメージはサポート切れだからもう使わないでね。
使っても良いけどずーっと遠くからイメージ取得するからデプロイ完了するまで時間が掛かるよ!
ということですね。

解決

AWS Lambda における Python 3.6 のサポート終了
の時と同様にAWS環境内全てをサクッと精査したいですよね。

コード

#!/bin/sh

_ACCOUNT_ID=************

for region in `aws ec2 describe-regions --region ap-northeast-1 --all-regions | jq -r .Regions[].RegionName`
do
  echo "# region: ${region}"
  for project in `aws codebuild list-projects --region ${region} --cli-read-timeout 5 --cli-connect-timeout 5 --query "projects[]" --output text`
  do
    image=$(aws codebuild batch-get-projects --region ${region} --cli-read-timeout 5 --cli-connect-timeout 5 --names "arn:aws:codebuild:${region}:${_ACCOUNT_ID}:project/${project}" --query "projects[].environment.image" --output text)
    if [[ "${image}" == "aws/codebuild/standard:4.0" ]]; then
      echo "${project}"
    fi
  done
done

結果

...
# region: ap-northeast-1
プロジェクト名
プロジェクト名
プロジェクト名
...

のような結果がリージョン毎に表示されますので、このプロジェクトのビルド環境を変更してあげてくださいね。

注意

An error occurred (UnrecognizedClientException) when calling the ListProjects operation: The security token included in the request is invalid.

のようなエラーがリージョンによっては表示されますが、そもそも EC2用 のリージョン一覧使っているので、aws codebuild list-projects が未対応のリージョンではこのようなエラーとなってしまいます。

一言

2023年2月16日現在、AWS公式のチェック用スクリプトは提供されていません。
今回はそれ程緊急性や重要性が高く無いということでしょうか。

だとしてもサポート切れについてはしっかりと対応しておきましょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0