Skip to content

Conversation

kichik
Copy link
Member

@kichik kichik commented Jun 5, 2025

No description provided.

@kichik kichik requested a review from Copilot June 5, 2025 19:50
Copy link

@Copilot Copilot AI left a 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 simplifies the deletion of snapshots for outdated AMIs by updating asset references and leveraging the AWS SDK's built-in capability to delete associated snapshots.

  • Consolidated asset hash updates in JSON templates.
  • Removed the manual snapshot deletion loop from the Lambda function.
  • Added the "DeleteAssociatedSnapshots" flag to automate snapshot deletion.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/default.integ.snapshot/github-runners-test.template.json Updated S3Key to reference the new asset hash
test/default.integ.snapshot/github-runners-test.assets.json Updated asset key identifiers and corresponding objectKey values
src/image-builders/aws-image-builder/delete-resources.lambda.ts Simplified resource deletion by removing the manual snapshot deletion loop and using DeleteAssociatedSnapshots
Comments suppressed due to low confidence (1)

src/image-builders/aws-image-builder/delete-resources.lambda.ts:72

  • Verify that the 'DeleteAssociatedSnapshots' flag is supported by the current AWS SDK version and behaves as expected to automatically remove associated snapshots.
        DeleteAssociatedSnapshots: true,

@kichik
Copy link
Member Author

kichik commented Jun 7, 2025

Lambda currently comes bundled with version 3.774.0 of AWS SDK v3, but we need 3.819.0 and above for this.

@kichik
Copy link
Member Author

kichik commented Jun 24, 2025

Now it's at 3.806.0.

@kichik
Copy link
Member Author

kichik commented Aug 8, 2025

3.844.0 is rolling out!

@mergify mergify bot merged commit 80d05cd into main Aug 20, 2025
17 checks passed
@mergify mergify bot deleted the easier-ami-delete branch August 20, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant