Skip to content
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

support configuring function log settings #2058

Open
josefaidt opened this issue Sep 26, 2024 · 3 comments · May be fixed by #2055
Open

support configuring function log settings #2058

josefaidt opened this issue Sep 26, 2024 · 3 comments · May be fixed by #2055
Labels
feature-request New feature or request function Issue pertaining to Amplify Function p4

Comments

@josefaidt
Copy link
Contributor

Environment information

n/a

Describe the feature

support configuring function log settings on defineFunction, with a pattern that can extend to other resources like Auth

import { defineFunction } from "@aws-amplify/backend"

defineFunction({
  name: "my-function",
  logging: {
	// https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.NodejsFunction.html#applicationloglevelv2
    level: "INFO",
	// https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.NodejsFunction.html#logretention
    retention: "1 week",
  },
})

Use case

to customize log settings

@josefaidt josefaidt added the pending-triage Incoming issues that need categorization label Sep 26, 2024
@ykethan
Copy link
Member

ykethan commented Sep 26, 2024

Marking as feature request to support logging customization.

@ykethan ykethan added feature-request New feature or request function Issue pertaining to Amplify Function and removed pending-triage Incoming issues that need categorization labels Sep 26, 2024
@lukebellamy053
Copy link

I raised this MR yesterday to allow the specification of the log retention period: #2055
I'd be fairly happy to extend it to support more functionality like this if desired

@josefaidt josefaidt added the p4 label Sep 26, 2024
@josefaidt josefaidt linked a pull request Sep 26, 2024 that will close this issue
4 tasks
@sobolk
Copy link
Member

sobolk commented Oct 3, 2024

I addition to this should we have npx ampx sandbox --stream-function-logs --log-level debug ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request function Issue pertaining to Amplify Function p4
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants