[レポート] AWS CloudFormationの新着情報 #DOP408 #reinvent 2019

2019.12.05

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

AWS事業本部 梶原@ラスベガスです。

AWS re:Invent 2019に参加しています。

このエントリでラスベガスで開催されているre:Inventのセッション「AWS CloudFormationの新着情報」に参加したのでレポートします。

セッション概要

DOP408-R1 - [REPEAT 1] What's new in AWS CloudFormation https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=97996

AWS CloudFormation is one of the most widely used AWS tools, enabling infrastructure as code, deployment automation, repeatability, compliance, and standardization. In this session, we cover the latest improvements and best practices for AWS CloudFormation customers in particular, and for seasoned infrastructure engineers in general. We cover new features and improvements that span many use cases, including programmability options, cross-region and cross-account automation, operational safety, and additional integration with many other AWS services.

AWS CloudFormationは、最も広く使用されているAWSツールの1つであり、コード、展開の自動化、再現性、コンプライアンス、標準化などのインフラストラクチャを実現します。 このセッションでは、特にAWS CloudFormationのお客様および一般的なインフラストラクチャエンジニア向けの最新の改善点とベストプラクティスについて説明します。 プログラマビリティオプション、クロスリージョンおよびクロスアカウントの自動化、運用の安全性、他の多くのAWSサービスとの追加統合など、多くのユースケースにまたがる新機能と改善点について説明します。

スピーカー

Jing Ling - Senior Product Manager, Amazon Web Services
Luis Colon - Senior Developer Advocate, Amazon Web Services

レポート

アジェンダ

  • Coverage updates : 新着情報のおさらい
  • Feature highlights : 新着情報のハイライト
  • New programing options : 新しいプログラミングオプション

Coverage updates : 新着情報のおさらい

関連セッション

  • DOP302-R - [REPEAT] Best practices for authoring AWS CloudFormation
  • DOP312-R - [REPEAT] Customize AWS CloudFormation with open-source tools
  • DOP313-R - [REPEAT] Assembling an AWS CloudFormation authoring tool chain
  • DOP325-R - [REPEAT] Deploying AWS CloudFormation StackSets across accounts and Regions

CloudFormation の概要

  • Code
    • YAML or JSONでテンプレートは作成します
    • マクロやトランスフォーム昨日からも作成されます
    • より高い層で記載する場合はAWS Cloud Development Kitで記載します
  • Commit
    • 直接ブラウザから記載
    • S3へのアップロード
    • CI/CDパイプラインの中で使用する事をお勧めします
    • cfn-lintやTaskCatを用いて検証します
  • Execute
    • コンソールから
    • CLIから
    • AWS SDKから
    • またはStackSetsを使用してクロスアカウントまた複数のリージョンへ
  • Deploy
    • 作成、更新、管理は統一された方法で行われます

Feature highlights : 新着情報のハイライト

New resource coverrage : 新しいリソースの対応

  • New resource coverrage
    • Amazon EventBridge
    • Amazon Elastic Compute Cloud(Amazon EC2) Traffic Mirrorring
    • Amazon Quantamu Ledger Database(Amazon QLDB)
    • Amazon Managed Blockchain
    • AWS Lake Formation
    • AWS CloudWatch Anomaly Detector
    • AWS IoT Analytics, AWS IoT Events
    • AWS Elemental MediaLive
    • AWS Security Hub
    • AWS Amplify
  • 488 のリソースタイプカバーしています

  • 180 の追加が1年間でありました
  • また最近の更新もカバーします
    • Amazon API Gateway V2
    • Amazon SageMaker
    • Amazon IoT Grenngrass
    • Amazon CloudWatch Events
    • Amazon SES
    • Amazon App Mesh
    • Amazon EC2
    • Amazon AppStream
    • Amazon Kinesis Data Analytics V2
    • Amazon GuradDuty
    • AWS AppSync
    • Amazon MQ
    • Amazon Lambda Leyres
    • Amazon IoT 1Click
    • Amazon Neptune
    • Amazon ECS Service Discovery
    • Amazon DocumentDB

Public coverage roadmap

  • https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/projects/1

  • すべての情報は一般に公開されます
  • Researching
    • この主要なものを調査し、バックログから選んだものです。そのため、これはサービスチームと話し合って詳細を確認するために行われます。
  • We're working on it
    • 積極的に対応している列です
  • Coming Soon
    • 間もなくリリースします。最後の段階であり、最終テストを行います。
  • Shipped
    • この列は、今日すでに利用可能です。

Feature highlights

Console UX update

  • コンソールが新しくなりました

Resouce Import

  • 既存のリソースを再作成せずにStackに紐づけることができます
  • 複数のリソースも1回の操作で実施できます

  • リファクタリングをすることが可能です
  • リソースを削除せずにスタックを移動することが可能です
    1. deletion policy = retainを設定し、StackAを更新
    2. StackAからリソースを削除
    3. StackBにリソースをインポート

StackSets enhancements

  • StackSetsでのドリフト検出が可能になりました
  • リソースの制限が緩和されました
    • 管理アカウント数が20 -> 100に
    • スタックごとのスタックインスタンスの総数が500 -> 2000に

Integeration with AWS Organizations

※Coming soon - (原文) Automaion of multi-account and multi-regeon permissions management and deployment through AWS Organizatinons - AWS Organizationを介したマルチアカウントおよびマルチリージョンのアクセス許可の管理と展開の自動化

Permission model

  • サービス管理の許可 New!
    • カスタマーは不要なデプロイ用のロールを作成する必要はありません
    • AWS Organizationsからfull serviceを使用できます

Deployment ot organizatons root or oranization unit

  • ルートアカウントまたOrganizatinons単位でdeployを実施できます New!

Automacitc deployments

  • Automacitc deployments(自動デプロイ) New!
    • アカウント追加時に自動でデプロイできます
    • アカウント削除時に自動で削除できます

Feature highlights まとめ

  • Console UX update
  • Resouce Import
  • StackSets enhancements
  • 先ほど発表した昨日は近日中にまた、Keynoteで発表された昨日のサポートも近日中に行われます

More programing option

  • Core YAML/JSON
    • parameters, mappings, outputs, function
    • 他の変換ツールの出力となる
  • Macro/transform
    • ショートカット
    • AWS SAM, マクロ
  • High-Level language
    • AWS CDK
    • Troposphere(python)
  • Custom resouces
    • AWS Lambda
    • Call Remote API

Linter Update

  • YAML/JSONの検証
  • リソース仕様の活用
  • AWS SAMのサポート
  • 7つの著名なエディタのサポート
  • GitHub actionsでの実行をサポート
  • カスタマイズ / 仕様の上書き
    • https://binx.io/2018/07/07/aws-cloud-formation-validation-in-cicd-pipelines/

AWS Cloud Development kit

  • 2019/07 GA
  • 用意にベストプラクティスを共有できる
  • コードが少なく記載可能
  • ヒントやサジェスト機能を使用できます
Custom Resouce
Resouces:
    AMIInfo:
        Type: "Custom::AMIInfo"
    Properties:
        ServiceToken: !GetAtt AMIIF.Arn
  • Lambdaで実装
  • 多くのサンプルがGitHubにある
CloudFormation Registry
  • namespaceを拡張
  • New runtime leverages changes sets, rollbacks, and other features in the future
  • new tools help create handless, data types, properrtirs, permissions
  • new result createing and consumign custom resource providers in now easier, with richer functionally
Resouces:
    MyResouces:
        Type: "AnyCompany::Service::Resource"
    Properties:
        AnyProperty: 1000
Comparison

  • カスタムリソースとCloudFormation レジストリの比較

Migration guidance

  • Creating a JSON schema
  • Generate scaffolidiing with CLI
  • Reusing(where applicabale) AIP Calls for handlers
  • Leveragin CLI to test addtitinal handlers, submit to regstry

We welcome your inovolvement

私たちはあなたからのフィードバックを期待しています。

感想

アカウント作成時の自動デプロイや削除時の削除が近日リリースされそう(Soon)という事だったのでとても期待しています。 普段からCloudFormationをメインで使っていますが、作ったらテンプレートを削除することもありましたがリソースインポートの機能でリファクタリングできそうな気がしてきました。

同セッションレポート

[レポート]What’s New in AWS CloudFormation #reinvent #DOP408