Skip to content

Commit

Permalink
function: change log group name
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed Mar 7, 2024
1 parent 9936ae1 commit 1c3ca77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/platform/src/components/aws/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Link } from "../link.js";
import { VisibleError } from "../error.js";
import { Warp } from "../warp.js";
import type { Input } from "../input.js";
import { prefixName } from "../naming.js";

const RETENTION = {
"1 day": 1,
Expand Down Expand Up @@ -1300,7 +1301,7 @@ export class Function
return new aws.cloudwatch.LogGroup(
`${name}LogGroup`,
transform(args.transform?.logGroup, {
name: `/${$app.name}/${$app.stage}/${name}`,
name: `/aws/lambda/${prefixName(name)}`,
retentionInDays: logging.apply(
(logging) => RETENTION[logging.retention],
),
Expand Down

0 comments on commit 1c3ca77

Please sign in to comment.