EncryptionKey:
DeletionPolicy: Delete
Type: AWS:
:KMS::Key
Properties:
KeyPolicy:
Version: 2012-10-17
Id: !Ref AWS::StackName
Statement:
- Effect: Allow
Principal:
AWS:
- !Sub "arn:${AWS::Partition}
:iam::${AWS::AccountId}:root"
Action: 'kms:*'
Resource: '*'
- Effect: Allow
Principal:
Service:
-
cloudwatch.amazonaws.com Action:
- 'kms:Decrypt'
- 'kms:GenerateDataKey*'
Resource: '*'
EnableKeyRotation: true