You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2025. It is now read-only.
feat: Add option to set lambda memory increase webhook memory (#3778)
- Configurable memory for lambda
- Webhook had no explicit memoery set, default is 128. Now set to 256
after running some benchmarking.
## Tested
- [x] Deefault example
- [x] Multi runner example
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack.
179
179
| <aname="input_logging_retention_in_days"></a> [logging\_retention\_in\_days](#input\_logging\_retention\_in\_days)| Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. |`number`|`180`| no |
180
180
| <aname="input_minimum_running_time_in_minutes"></a> [minimum\_running\_time\_in\_minutes](#input\_minimum\_running\_time\_in\_minutes)| The time an ec2 action runner should be running at minimum before terminated, if not busy. |`number`|`null`| no |
181
181
| <aname="input_pool_config"></a> [pool\_config](#input\_pool\_config)| The configuration for updating the pool. The `pool_size` to adjust to by the events triggered by the `schedule_expression`. For example you can configure a cron expression for weekdays to adjust the pool to 10 and another expression for the weekend to adjust the pool to 1. | <pre>list(object({<br> schedule_expression = string<br> size = number<br> }))</pre> |`[]`| no |
182
+
| <aname="input_pool_lambda_memory_size"></a> [pool\_lambda\_memory\_size](#input\_pool\_lambda\_memory\_size)| Memory size limit for scale-up lambda. |`number`|`512`| no |
182
183
| <aname="input_pool_lambda_reserved_concurrent_executions"></a> [pool\_lambda\_reserved\_concurrent\_executions](#input\_pool\_lambda\_reserved\_concurrent\_executions)| Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. |`number`|`1`| no |
183
184
| <aname="input_pool_lambda_timeout"></a> [pool\_lambda\_timeout](#input\_pool\_lambda\_timeout)| Time out for the pool lambda in seconds. |`number`|`60`| no |
184
185
| <aname="input_pool_runner_owner"></a> [pool\_runner\_owner](#input\_pool\_runner\_owner)| The pool will deploy runners to the GitHub org ID, set this value to the org to which you want the runners deployed. Repo level is not supported. |`string`|`null`| no |
@@ -195,6 +196,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack.
195
196
| <aname="input_runner_binaries_s3_logging_bucket_prefix"></a> [runner\_binaries\_s3\_logging\_bucket\_prefix](#input\_runner\_binaries\_s3\_logging\_bucket\_prefix)| Bucket prefix for action runner distribution bucket access logging. |`string`|`null`| no |
| <aname="input_runner_binaries_s3_versioning"></a> [runner\_binaries\_s3\_versioning](#input\_runner\_binaries\_s3\_versioning)| Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform! |`string`|`"Disabled"`| no |
199
+
| <aname="input_runner_binaries_syncer_lambda_memory_size"></a> [runner\_binaries\_syncer\_lambda\_memory\_size](#input\_runner\_binaries\_syncer\_lambda\_memory\_size)| Memory size limit in MB for binary syncer lambda. |`number`|`256`| no |
198
200
| <aname="input_runner_binaries_syncer_lambda_timeout"></a> [runner\_binaries\_syncer\_lambda\_timeout](#input\_runner\_binaries\_syncer\_lambda\_timeout)| Time out of the binaries sync lambda in seconds. |`number`|`300`| no |
199
201
| <aname="input_runner_binaries_syncer_lambda_zip"></a> [runner\_binaries\_syncer\_lambda\_zip](#input\_runner\_binaries\_syncer\_lambda\_zip)| File location of the binaries sync lambda zip file. |`string`|`null`| no |
200
202
| <aname="input_runner_boot_time_in_minutes"></a> [runner\_boot\_time\_in\_minutes](#input\_runner\_boot\_time\_in\_minutes)| The minimum time for an EC2 runner to boot and register as a runner. |`number`|`5`| no |
@@ -213,9 +215,11 @@ Talk to the forestkeepers in the `runners-channel` on Slack.
213
215
| <aname="input_runners_lambda_s3_object_version"></a> [runners\_lambda\_s3\_object\_version](#input\_runners\_lambda\_s3\_object\_version)| S3 object version for runners lambda function. Useful if S3 versioning is enabled on source bucket. |`string`|`null`| no |
214
216
| <aname="input_runners_lambda_zip"></a> [runners\_lambda\_zip](#input\_runners\_lambda\_zip)| File location of the lambda zip file for scaling runners. |`string`|`null`| no |
215
217
| <aname="input_runners_maximum_count"></a> [runners\_maximum\_count](#input\_runners\_maximum\_count)| The maximum number of runners that will be created. |`number`|`3`| no |
218
+
| <aname="input_runners_scale_down_lambda_memory_size"></a> [runners\_scale\_down\_lambda\_memory\_size](#input\_runners\_scale\_down\_lambda\_memory\_size)| Memory size limit in MB for scale-down lambda. |`number`|`512`| no |
216
219
| <aname="input_runners_scale_down_lambda_timeout"></a> [runners\_scale\_down\_lambda\_timeout](#input\_runners\_scale\_down\_lambda\_timeout)| Time out for the scale down lambda in seconds. |`number`|`60`| no |
220
+
| <aname="input_runners_scale_up_Lambda_memory_size"></a> [runners\_scale\_up\_Lambda\_memory\_size](#input\_runners\_scale\_up\_Lambda\_memory\_size)| Memory size limit in MB for scale-up lambda. |`number`|`512`| no |
217
221
| <aname="input_runners_scale_up_lambda_timeout"></a> [runners\_scale\_up\_lambda\_timeout](#input\_runners\_scale\_up\_lambda\_timeout)| Time out for the scale up lambda in seconds. |`number`|`30`| no |
218
-
| <aname="input_runners_ssm_housekeeper"></a> [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper)| Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.<br><br> `schedule_expression`: is used to configure the schedule for the lambda.<br> `enabled`: enable or disable the lambda trigger via the EventBridge.<br> `lambda_timeout`: timeout for the lambda in seconds.<br> `config`: configuration for the lambda function. Token path will be read by default from the module. | <pre>object({<br> schedule_expression = optional(string, "rate(1 day)")<br> enabled = optional(bool, true)<br> lambda_timeout = optional(number, 60)<br> config = object({<br> tokenPath = optional(string)<br> minimumDaysOld = optional(number, 1)<br> dryRun = optional(bool, false)<br> })<br> })</pre> | <pre>{<br> "config": {}<br>}</pre> | no |
222
+
| <a name="input_runners_ssm_housekeeper"></a> [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.<br><br> `schedule_expression`: is used to configure the schedule for the lambda.<br> `enabled`: enable or disable the lambda trigger via the EventBridge.<br> `lambda_memory_size`: lambda memery size limit.<br> `lambda_timeout`: timeout for the lambda in seconds.<br> `config`: configuration for the lambda function. Token path will be read by default from the module. | <pre>object({<br> schedule_expression = optional(string, "rate(1 day)")<br> enabled = optional(bool, true)<br> lambda_memory_size = optional(number, 512)<br> lambda_timeout = optional(number, 60)<br> config = object({<br> tokenPath = optional(string)<br> minimumDaysOld = optional(number, 1)<br> dryRun = optional(bool, false)<br> })<br> })</pre> | <pre>{<br> "config": {}<br>}</pre> | no |
219
223
| <aname="input_scale_down_schedule_expression"></a> [scale\_down\_schedule\_expression](#input\_scale\_down\_schedule\_expression)| Scheduler expression to check every x for scale down. |`string`|`"cron(*/5 * * * ? *)"`| no |
220
224
| <aname="input_scale_up_reserved_concurrent_executions"></a> [scale\_up\_reserved\_concurrent\_executions](#input\_scale\_up\_reserved\_concurrent\_executions)| Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. |`number`|`1`| no |
221
225
| <aname="input_ssm_paths"></a> [ssm\_paths](#input\_ssm\_paths)| The root path used in SSM to store configuration and secrets. | <pre>object({<br> root = optional(string, "github-action-runners")<br> app = optional(string, "app")<br> runners = optional(string, "runners")<br> webhook = optional(string, "webhook")<br> use_prefix = optional(bool, true)<br> })</pre> |`{}`| no |
@@ -230,6 +234,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack.
230
234
| <aname="input_userdata_template"></a> [userdata\_template](#input\_userdata\_template)| Alternative user-data template, replacing the default template. By providing your own user\_data you have to take care of installing all required software, including the action runner. Variables userdata\_pre/post\_install are ignored. |`string`|`null`| no |
231
235
| <aname="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id)| The VPC for security groups of the action runners. |`string`| n/a | yes |
232
236
| <aname="input_webhook_lambda_apigateway_access_log_settings"></a> [webhook\_lambda\_apigateway\_access\_log\_settings](#input\_webhook\_lambda\_apigateway\_access\_log\_settings)| Access log settings for webhook API gateway. | <pre>object({<br> destination_arn = string<br> format = string<br> })</pre> |`null`| no |
237
+
| <aname="input_webhook_lambda_memory_size"></a> [webhook\_lambda\_memory\_size](#input\_webhook\_lambda\_memory\_size)| Memory size limit in MB for webhook lambda in. |`number`|`256`| no |
233
238
| <aname="input_webhook_lambda_s3_key"></a> [webhook\_lambda\_s3\_key](#input\_webhook\_lambda\_s3\_key)| S3 key for webhook lambda function. Required if using S3 bucket to specify lambdas. |`string`|`null`| no |
234
239
| <aname="input_webhook_lambda_s3_object_version"></a> [webhook\_lambda\_s3\_object\_version](#input\_webhook\_lambda\_s3\_object\_version)| S3 object version for webhook lambda function. Useful if S3 versioning is enabled on source bucket. |`string`|`null`| no |
235
240
| <aname="input_webhook_lambda_timeout"></a> [webhook\_lambda\_timeout](#input\_webhook\_lambda\_timeout)| Time out of the webhook lambda in seconds. |`number`|`10`| no |
Copy file name to clipboardExpand all lines: modules/ami-housekeeper/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,7 @@ No modules.
103
103
| <aname="input_aws_partition"></a> [aws\_partition](#input\_aws\_partition)| (optional) partition for the base arn if not 'aws' |`string`|`"aws"`| no |
104
104
| <a name="input_cleanup_config"></a> [cleanup\_config](#input\_cleanup\_config) | Configuration for AMI cleanup.<br><br> `amiFilters` - Filters to use when searching for AMIs to cleanup. Default filter for images owned by the account and that are available.<br> `dryRun` - If true, no AMIs will be deregistered. Default false.<br> `launchTemplateNames` - Launch template names to use when searching for AMIs to cleanup. Default no launch templates.<br> `maxItems` - The maximum numer of AMI's tha will be queried for cleanup. Default no maximum.<br> `minimumDaysOld` - Minimum number of days old an AMI must be to be considered for cleanup. Default 30.<br> `ssmParameterNames` - SSM parameter names to use when searching for AMIs to cleanup. This parameter should be set when using SSM to configure the AMI to use. Default no SSM parameters. | <pre>object({<br> amiFilters = optional(list(object({<br> Name = string<br> Values = list(string)<br> })),<br> [{<br> Name : "state",<br> Values : ["available"],<br> },<br> {<br> Name : "image-type",<br> Values : ["machine"],<br> }]<br> )<br> dryRun = optional(bool, false)<br> launchTemplateNames = optional(list(string))<br> maxItems = optional(number)<br> minimumDaysOld = optional(number, 30)<br> ssmParameterNames = optional(list(string))<br> })</pre> | `{}` | no |
105
105
| <aname="input_lambda_architecture"></a> [lambda\_architecture](#input\_lambda\_architecture)| AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. |`string`|`"arm64"`| no |
106
+
| <aname="input_lambda_memory_size"></a> [lambda\_memory\_size](#input\_lambda\_memory\_size)| Memory size linit in MB of the lambda. |`number`|`256`| no |
106
107
| <aname="input_lambda_principals"></a> [lambda\_principals](#input\_lambda\_principals)| (Optional) add extra principals to the role created for execution of the lambda, e.g. for local testing. | <pre>list(object({<br> type = string<br> identifiers = list(string)<br> }))</pre> |`[]`| no |
107
108
| <aname="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime)| AWS Lambda runtime. |`string`|`"nodejs18.x"`| no |
108
109
| <aname="input_lambda_s3_bucket"></a> [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket)| S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. |`string`|`null`| no |
0 commit comments