Skip to content

Commit

Permalink
Merge pull request #1602 from guardian/ts/update-copier-lambda
Browse files Browse the repository at this point in the history
feat: update image copier lambda
  • Loading branch information
tjsilver authored Jan 21, 2025
2 parents 47b1d35 + eeb206f commit 86cd00f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ new ImageCopierLambda(app, "imagecopier-lambda-stack", {
stack: "deploy",
stage: "PROD",
description: "AMIgo image copier lambda",
version: "v3", // Update this when the lambda is updated.
version: "v4", // Update this when the lambda is updated.
});
4 changes: 2 additions & 2 deletions cdk/lib/__snapshots__/image-copier-lambda.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`the lambda stack matches the snapshot 1`] = `
"Properties": {
"Code": {
"S3Bucket": "deploy-tools-dist",
"S3Key": "cdk/TEST/imagecopier/image-copier-v3.zip",
"S3Key": "cdk/TEST/imagecopier/image-copier-v4.zip",
},
"Description": "Lambda for housekeeping AMIgo baked AMIs in other accounts",
"Environment": {
Expand Down Expand Up @@ -210,7 +210,7 @@ exports[`the lambda stack matches the snapshot 1`] = `
"Properties": {
"Code": {
"S3Bucket": "deploy-tools-dist",
"S3Key": "cdk/TEST/imagecopier/image-copier-v3.zip",
"S3Key": "cdk/TEST/imagecopier/image-copier-v4.zip",
},
"Description": "Lambda for copying and encrypting AMIgo baked AMIs",
"Environment": {
Expand Down
2 changes: 1 addition & 1 deletion cdk/lib/image-copier-lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("the lambda stack", () => {
const stack = new ImageCopierLambda(app, "IntegrationTest", {
stack: "cdk",
stage: "TEST",
version: "v3",
version: "v4",
});
const template = Template.fromStack(stack);
expect(template.toJSON()).toMatchSnapshot();
Expand Down
3 changes: 2 additions & 1 deletion imageCopier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ This is done as part of the main `tools::amigo` RiffRaff build.

**YOU MUST RENAME THE ARTIFACT:** the lambda will not update (even if the file
uploads to S3) unless the name is also changed. To do this bump the
`ImageCopierLambdaProps.version`, which is set in `bin/cdk.ts`.
`ImageCopierLambdaProps.version`, which is set in `bin/cdk.ts`, and rename the
uploaded artifact in S3 to match. Also update the version in the test to match.

**For PROD:** no action required; `tools::amigo` deploys to PROD automatically
whenever changes are merged into `main`.
Expand Down

0 comments on commit 86cd00f

Please sign in to comment.