Skip to content

Commit 2840913

Browse files
authored
feat: Upgrade to CDK 2.215.0. RustFunction now supports specifying a log group. (#83)
* feat: Upgrade to CDK 2.215.0. RustFunction now supports specifying a log group. * Update the yarn lockfile.
1 parent 0c47d8c commit 2840913

File tree

6 files changed

+502
-63
lines changed

6 files changed

+502
-63
lines changed

.projen/deps.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { awscdk } = require('projen');
22

33
const project = new awscdk.AwsCdkConstructLibrary({
44
author: 'David Calavera',
5-
cdkVersion: '2.63.0',
5+
cdkVersion: '2.215.0',
66
defaultReleaseBranch: 'main',
77
name: 'cargo-lambda-cdk',
88
repositoryUrl: 'https://github.com/cargo-lambda/cargo-lambda-cdk.git',

API.md

Lines changed: 391 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/function.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { join } from 'path';
22
import { env } from 'process';
33
import { App, Stack } from 'aws-cdk-lib';
4+
import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs';
45
import { RustFunction, cargoLambdaVersion } from '../src/index';
56

67
const forcedDockerBundling = !!env.FORCE_DOCKER_RUN || !cargoLambdaVersion();
@@ -66,4 +67,25 @@ describe('CargoLambda.RustFunction', () => {
6667
app.synth();
6768
});
6869
});
70+
71+
describe('With log group specified', () => {
72+
const app = new App();
73+
const stack = new Stack(app);
74+
const testSource = join(__dirname, 'fixtures/single-package');
75+
76+
const logGroup = new LogGroup(stack, 'LogGroup', {
77+
retention: RetentionDays.ONE_WEEK,
78+
});
79+
80+
const rustFunction = new RustFunction(stack, 'rust function', {
81+
manifestPath: testSource,
82+
logGroup: logGroup,
83+
});
84+
85+
logGroup.grantWrite(rustFunction);
86+
87+
test('bundle function', () => {
88+
app.synth();
89+
});
90+
});
6991
});

yarn.lock

Lines changed: 85 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)