A Config rule that checks if Amazon Elastic Container Service (ECS) Fargate Services is running on the latest Fargate platform version. The rule is NON_COMPLIANT if ECS Service platformVersion not set to LATEST.

This config rule supports the following parameters:

  • latestLinuxVersion
    • Required: No
    • Type: String
    • Description:Latest Linux supported 'PlatformVersion' in semantic versioning (SemVer) format. Parameter may be needed if Fargate was deployed and the 'PlatformVersion' was explicitly specified or CodeDeploy is used as the 'DeploymentController'
  • latestWindowsVersion
    • Required: No
    • Type: String
    • Description:Latest Windows supported 'PlatformVersion' in semantic versioning (SemVer) format. Parameter may be needed if Fargate was deployed and the 'PlatformVersion' was explicitly specified or CodeDeploy is used as the 'DeploymentController'

CloudFormation Template

AWSTemplateFormatVersion: '2010-09-09'
Description: Check ECS Fargate services for latest platform version
Resources:
  ConfigRule:
    Type: 'AWS::Config::ConfigRule'
    Properties:
      ConfigRuleName: "ecs-fargate-latest-platform-version"
      Description: "Checks if ECS Fargate services is set to the latest platform version. The rule is NON_COMPLIANT if PlatformVersion for the Fargate launch type is not set to LATEST, or if neither latestLinuxVersion nor latestWindowsVersion are provided as parameters."
      Source:
        Owner: "AWS"
        SourceIdentifier: "ECS_FARGATE_LATEST_PLATFORM_VERSION"
      Scope:
        ComplianceResourceTypes:
          - "AWS::ECS::Service"