aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
184 stars 62 forks source link

feat: add log retention to defineFunction #2055

Open lukebellamy053 opened 1 month ago

lukebellamy053 commented 1 month ago

Problem

Currently there is no way to set the log retention or log group of a function created using defineFunction. This is a fairly obvious issue as it means people will be paying for logs they may no longer want

Issue number, if available:

Changes

Added the option to specify a log retention period when using defineFunction

Corresponding docs PR, if applicable:

Validation

Added unit test that validate the cloud formation properties are correctly added

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: e18e815759107f0f3b685bfeb0367b311eb32874

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------------- | ----- | | @aws-amplify/backend-function | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR