Skip to content

Commit 3f9ade0

Browse files
committed
update docs
1 parent c6685a3 commit 3f9ade0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/configuration.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,42 @@ The option `job_retry.delay_in_seconds` is the delay before the job status is ch
163163

164164
This module also allows you to run agents from a prebuilt AMI to gain faster startup times. The module provides several examples to build your own custom AMI. To remove old images, an [AMI housekeeper module](modules/public/ami-housekeeper.md) can be used. See the [AMI examples](ami-examples/index.md) for more details.
165165

166+
## AMI Configuration
167+
168+
By default, the module will automatically select appropriate AMI images:
169+
- For Linux x64: Amazon Linux 2023 x86_64
170+
- For Linux ARM64: Amazon Linux 2023 ARM64
171+
- For Windows: Windows Server 2022 English Full ECS Optimized
172+
173+
However, you can override these defaults using the `ami` object in two ways:
174+
175+
1. **Using AMI Filters**
176+
177+
You can define filters and owners to look up an AMI. The module will store the AMI ID in an SSM parameter that is managed by the module.
178+
179+
```hcl
180+
ami = {
181+
filter = {
182+
name = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-*"]
183+
state = ["available"]
184+
}
185+
owners = ["amazon"]
186+
}
187+
```
188+
189+
2. **Using SSM Parameter**
190+
191+
Provide a parameter in SSM that contains the AMI ID. The parameter should be of type `String` and the module will grant the required lambdas access to this parameter.
192+
193+
```hcl
194+
ami = {
195+
id_ssm_parameter_arn = "arn:aws:ssm:region:account:parameter/path/to/ami/parameter"
196+
}
197+
```
198+
199+
> **Note:** The old way of configuring AMIs using individual variables (`ami_filter`, `ami_owners`, `ami_kms_key_arn`) is deprecated and will be removed in a future version. It is recommended to migrate to the new consolidated `ami` object.
200+
201+
166202
## Logging
167203

168204
The module uses [AWS Lambda Powertools](https://awslabs.github.io/aws-lambda-powertools-typescript/latest/) for logging. By default the log level is set to `info`, by setting the log level to `debug` the incoming events of the Lambda are logged as well.

0 commit comments

Comments
 (0)