AWS Fundamentals Logo
AWS Fundamentals
AWS::Logs::LogGroup

Logs LogGroup

The AWS::Logs::LogGroup resource specifies a log group. A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group. You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group: + Log group names must be unique within a Region for an AWS account. + Log group names can be between 1 and 512 characters long. + Log group names ...

Properties

9 configurable properties. Click a row to see details.

Filter:
PropertyTypeFlags
DataProtectionPolicy
object
DeletionProtectionEnabled
boolean
FieldIndexPolicies
Array<object>
KmsKeyId
string
LogGroupClass
string
LogGroupName
string
Create-only
ResourcePolicyDocument
object
RetentionInDays
integer
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Arnstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::Logs::LogGroup

Resources:
  MyResource:
    Type: AWS::Logs::LogGroup
    Properties:
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

logs:DescribeLogGroupslogs:CreateLogGrouplogs:PutRetentionPolicylogs:TagResourcelogs:GetDataProtectionPolicylogs:PutDataProtectionPolicylogs:CreateLogDeliverys3:REST.PUT.OBJECT

read

logs:DescribeLogGroupslogs:ListTagsForResourcelogs:GetDataProtectionPolicylogs:DescribeIndexPolicieslogs:DescribeResourcePolicies

update

logs:DescribeLogGroupslogs:AssociateKmsKeylogs:DisassociateKmsKeylogs:PutRetentionPolicylogs:DeleteRetentionPolicylogs:TagResourcelogs:UntagResourcelogs:ListTagsForResource

delete

logs:DescribeLogGroupslogs:DeleteLogGrouplogs:DeleteDataProtectionPolicy

list

logs:DescribeLogGroupslogs:ListTagsForResource

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceLogs
Properties10
Required0
TaggingSupported
Primary IDLogGroupName

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

LogGroupName

External Links