lambda-scale-up.json 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "Version": "2012-10-17",
  3. "Statement": [
  4. {
  5. "Effect": "Allow",
  6. "Action": [
  7. "ec2:DescribeInstances",
  8. "ec2:DescribeTags",
  9. "ec2:RunInstances",
  10. "ec2:CreateFleet",
  11. "ec2:CreateTags"
  12. ],
  13. "Resource": [
  14. "*"
  15. ]
  16. },
  17. {
  18. "Effect": "Allow",
  19. "Action": "iam:PassRole",
  20. "Resource": "${arn_runner_instance_role}"
  21. },
  22. {
  23. "Effect": "Allow",
  24. "Action": [
  25. "ssm:PutParameter"
  26. ],
  27. "Resource": "*"
  28. },
  29. {
  30. "Effect": "Allow",
  31. "Action": [
  32. "ssm:GetParameter"
  33. ],
  34. "Resource": [
  35. "${github_app_key_base64_arn}",
  36. "${github_app_id_arn}"
  37. ]
  38. },
  39. {
  40. "Effect": "Allow",
  41. "Action": [
  42. "sqs:ReceiveMessage",
  43. "sqs:GetQueueAttributes",
  44. "sqs:DeleteMessage"
  45. ],
  46. "Resource": "${sqs_arn}"
  47. },
  48. {
  49. "Effect": "Allow",
  50. "Action": [
  51. "kms:CreateGrant",
  52. "kms:Decrypt",
  53. "kms:DescribeKey",
  54. "kms:Encrypt",
  55. "kms:GenerateDataKey*",
  56. "kms:ReEncrypt*"
  57. ],
  58. "Resource": "*"
  59. %{ if kms_key_arn != "" ~}
  60. },
  61. {
  62. "Effect": "Allow",
  63. "Action": [
  64. "kms:Decrypt"
  65. ],
  66. "Resource": "${kms_key_arn}"
  67. %{ endif ~}
  68. }
  69. ]
  70. }