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
Deploy fails after removing service and upgrading to new version of serverless framework because an ApiGatewayLogGroup exists #6906
Comments
serverless deploy
fails for a recently removed service after upgrading to new version - An error occurred: ApiGatewayLogGroup - /aws/api-gateway/demo-email-form-dev already exists.
I have the same issue. |
This bug can happen when following deploy flow happens:
Workaround is to at step 2, redeploy service with logs explicitly turned off (via This will be effectively fixed once current handling of API Gateway stage settings is moved to custom resources (or CloudFormation when modifications to it will be supported). I have that on my todo list, but due to other priorities release window is uncertain. |
Hi medikoo, I'm experiencing this same issue but can't see how to deploy the service with logging on or off. Where would I be adding or removing this parameter? Thanks |
For reference, this is my serverless.yml file: org: chrismcharvey provider: functions: |
@ChrisHarveyHub see https://serverless.com/framework/docs/providers/aws/events/apigateway/#logs |
Hello 👋 There's another instance of that happening reported here: #8841 I investigated that issue a bit and I was wondering if defaulting |
At the beginning it was working like that, and there was a lot of issues, still they were implied by also by other bugs (e.g. we were disabling logs on externally setup API Gateway, defined by id in a service, or we were doing it even if there's no API Gateway configuration at all - that raised IAM error issues). Currently I'm still not sure. This is the setting that cannot be reliably set via CF, and users in general might have that setting set manually on their own, if we suddenly start to disable it (because this change will introduce such action), I can imagine we may receive a reports that we started to break the behavior. I think bulletproof approach would be to (1) Introduce state persistence with locking (thing we discussed once), I've patched the initial proposal here: #8896 and having that (2) react purely on changes to that setting (so remove only when What do you think? |
Thanks for the clarification @medikoo - I was exactly worried about potentially introducing even more bugs while trying to fix this using the current approach. I agree that the best approach moving forward would be to introduce a persistent state that could be used to track such settings. |
Seems a way around this is by changing your service name to something new to work around the error of the existing log. |
Bug Report
Description
What did you do?
Ran
serverless deploy
for a recently removed service.What happened?
The deployment failed because a resource was left over from a previous
sls remove
What should've happened?
The service should deploy.
What's the content of your
serverless.yml
file?SLS_DEBUG=*
environment variable (e.g.SLS_DEBUG=* serverless deploy
)From
serverless deploy --verbose
Similar or dependent issues:
The text was updated successfully, but these errors were encountered: