Project: KICS (Provisioning / Security & Compliance)
File: ef05a925-8568-4054-8ff1-f5ba82631c16.md

title: BOM - AWS EFS hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: ef05a925-8568-4054-8ff1-f5ba82631c16 Query name: BOM - AWS EFS Platform: CloudFormation Severity: <span style="color:#CCCCCC">Trace</span> Category: Bill Of Materials URL: A list of EFS resources found. Amazon Elastic File System (Amazon EFS) automatically grows and shrinks as you add and remove files with no need for management or provisioning.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="4" AWSTemplateFormatVersion: "2010-09-09" Description: "Create EFS system and Mount Targets for test VPC" Resources: FileSystemResource: Type: 'AWS::EFS::FileSystem' Properties: AvailabilityZoneName: us-east-1a BackupPolicy: Status: ENABLED Encrypted: true LifecyclePolicies: TransitionToIA: AFTER30DAYS FileSystemTags: Key: Name Value: TestFileSystem FileSystemPolicy: Version: "2012-10-17" Statement: Effect: "Allow" Action: "elasticfilesystem:ClientMount" Principal: AWS: 'arn:aws:iam::111122223333:role/EfsReadOnly' KmsKeyId: !GetAtt key Arn ``` ```json title="Positive test num. 2 - json file" hl_lines="4" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "FileSystemResource": { "Properties": { "AvailabilityZoneName": "us-east-1a", "BackupPolicy": { "Status": "ENABLED" }, "Encrypted": true, "FileSystemPolicy": { "Statement": [ { "Action": [ "elasticfilesystem:ClientMount" ], "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/EfsReadOnly" } } ], "Version": "2012-10-17" }, "FileSystemTags": [ { "Key": "Name", "Value": "TestFileSystem" } ], "KmsKeyId": [ "key", "Arn" ], "LifecyclePolicies": [ { "TransitionToIA": "AFTER30DAYS" } ] }, "Type": "AWS::EFS::FileSystem" } } } ``` ```yaml title="Positive test num. 3 - yaml file" hl_lines="4" AWSTemplateFormatVersion: "2010-09-09" Description: "Create EFS system and Mount Targets for test VPC" Resources: FileSystemResource: Type: 'AWS::EFS::FileSystem' Properties: AvailabilityZoneName: us-east-1a BackupPolicy: Status: ENABLED Encrypted: false LifecyclePolicies: TransitionToIA: AFTER30DAYS FileSystemTags: Key: Name Value: TestFileSystem ``` <details><summary>Positive test num. 4 - json file</summary> ```json hl_lines="4" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "FileSystemResource": { "Properties": { "AvailabilityZoneName": "us-east-1a", "BackupPolicy": { "Status": "ENABLED" }, "Encrypted": false, "FileSystemTags": [ { "Key": "Name", "Value": "TestFileSystem" } ], "KmsKeyId": [ "key", "Arn" ], "LifecyclePolicies": [ { "TransitionToIA": "AFTER30DAYS" } ] }, "Type": "AWS::EFS::FileSystem" } } } ``` </details> ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Resources: myDistribution: Type: AWS::CloudFront::Distribution Properties: DistributionConfig: Enabled: true ``` ```json title="Negative test num. 2 - json file" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "myDistribution": { "Type": "AWS::CloudFront::Distribution", "Properties": { "DistributionConfig": { "Enabled": "true" } } } } } ```