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

Config log_retention_in_days not working #2079

Open
garganshulgarg opened this issue Oct 30, 2023 · 1 comment
Open

Config log_retention_in_days not working #2079

garganshulgarg opened this issue Oct 30, 2023 · 1 comment

Comments

@garganshulgarg
Copy link

Whenever we are using log_retention_in_days attribute within our chalice configuration we are getting "Feature Unsupported exception"

chalice.package.UnsupportedFeatureError: LogGroup(resource_name='api_handler-log-group', log_group_name='/aws/lambda/xxx-api_handler', retention_in_days=7)

We are using chalice version 1.29.0

@antoine-briand
Copy link

antoine-briand commented Nov 23, 2023

Hi 👋

I'm not sure it's entirely related, but I'm trying to use 'log_retention_in_days': 7, in a chalice project with CDK. When I add this to the stage_config, I get the following error :

RuntimeError: Element referenced in Fn::Sub expression with logical ID: 'ApiHandler' was not found in the template

I'm using chalice==1.29.0 and python 3.10.

        self.chalice = Chalice(
            self,
            'ChaliceApp',
            source_dir=RUNTIME_SOURCE_DIR,
            stage_config={
                'environment_variables': self.environment_variables,
                'lambda_timeout': 900,
                'lambda_memory_size': 256,
                'log_retention_in_days' : 7
            },
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants