Skip to content

Instantly share code, notes, and snippets.

@zxkane
Created August 16, 2022 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zxkane/e33bf78c5e4908e0e8f0ec98f6914a07 to your computer and use it in GitHub Desktop.
Save zxkane/e33bf78c5e4908e0e8f0ec98f6914a07 to your computer and use it in GitHub Desktop.
aws logs put-resource-policy --policy-name AWSLogDeliveryWrite20150319 \
--policy-document '
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSLogDeliveryWrite",
"Effect": "Allow",
"Principal": {
"Service": "delivery.logs.amazonaws.com"
},
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": []
},
{
"Sid": "AWSLogDeliveryWrite2",
"Effect": "Allow",
"Principal": {
"Service": "delivery.logs.amazonaws.com"
},
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
],
"Condition": {
"StringEquals": {
"aws:SourceAccount": "845861764576"
},
"ArnLike": {
"aws:SourceArn": "arn:aws:logs:us-east-1:845861764576:*"
}
}
}
]
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment