-
Notifications
You must be signed in to change notification settings - Fork 702
fix: add SSM AMI parameter permissions and environment-based naming #5016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add missing SSM GetParameter and GetParameters permissions for AMI parameter ARN in scale-up lambda policy - Use environment variable prefix for SSM parameter name to ensure unique naming per environment
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances environment isolation and fixes Lambda scale-up permissions by making AMI parameter paths environment-specific and granting necessary SSM access. These changes prevent errors when the Lambda function handles batches by ensuring it can read the required AMI ID parameters.
Changes:
- Added environment variable to AMI parameter paths for better resource isolation across environments
- Extended Lambda scale-up IAM policy to include SSM AMI ID parameter access
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
modules/runners/policies/lambda-scale-up.json |
Grants Lambda scale-up function access to SSM AMI ID parameter |
examples/multi-runner/main.tf |
Makes AMI parameter path environment-specific for proper isolation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n string template The tflint validation was failing because var.environment can be null, and null values cannot be included in string templates. Changed to use local.environment which has a fallback value. Fixes the tflint error: Invalid template interpolation value. The expression result is null. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 I have created a release *beep* *boop* --- ## [7.4.0](v7.3.0...v7.4.0) (2026-02-04) ### Features * **control-plane:** tag control plane created SSM Parameters ([#4833](#4833)) ([#4834](#4834)) ([7e1a0a1](7e1a0a1)) @wadherv * use prefix variable for POWERTOOLS_SERVICE_NAME in Lambda functions ([#4948](#4948)) ([8bd61d2](8bd61d2)) @alexalbu001 ### Bug Fixes * add SSM AMI parameter permissions and environment-based naming ([#5016](#5016)) ([1a7158b](1a7158b)) * job retry mechanism not triggering ([#4961](#4961)) ([5039ae5](5039ae5)) * **lambda:** bump diff from 4.0.2 to 4.0.4 in /lambdas ([#5004](#5004)) ([cd86fe6](cd86fe6)) * **lambda:** bump lodash-es from 4.17.21 to 4.17.23 in /lambdas ([#5006](#5006)) ([c638e38](c638e38)) * **lambda:** bump the aws group in /lambdas with 7 updates ([#4998](#4998)) ([d373bcc](d373bcc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
This pull request introduces environment-specific configuration improvements and updates IAM policy resources to support new SSM parameters. The main changes focus on making resource naming more flexible and ensuring the Lambda scale-up policy has access to the necessary SSM parameters.
Configuration improvements:
al2023_arm64_namelocal inexamples/multi-runner/main.tfto include the environment variable, making AMI name paths environment-specific for better isolation and flexibility.IAM policy updates:
${ssm_ami_id_parameter_arn}to the resource list inmodules/runners/policies/lambda-scale-up.json, allowing Lambda scale-up operations to access the new SSM parameter for AMI IDs. This solve errors related handling batches