{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/2074","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/2074/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/2074/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/2074/events","html_url":"https://github.com/serverless/serverless/issues/2074","id":175870416,"number":2074,"title":"API Gateway URLs change when removing and redeploying service","user":{"login":"kennu","id":13944,"avatar_url":"https://avatars.githubusercontent.com/u/13944?v=3","gravatar_id":"","url":"https://api.github.com/users/kennu","html_url":"https://github.com/kennu","followers_url":"https://api.github.com/users/kennu/followers","following_url":"https://api.github.com/users/kennu/following{/other_user}","gists_url":"https://api.github.com/users/kennu/gists{/gist_id}","starred_url":"https://api.github.com/users/kennu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennu/subscriptions","organizations_url":"https://api.github.com/users/kennu/orgs","repos_url":"https://api.github.com/users/kennu/repos","events_url":"https://api.github.com/users/kennu/events{/privacy}","received_events_url":"https://api.github.com/users/kennu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-08T21:34:02Z","updated_at":"2016-09-09T13:56:35Z","closed_at":null,"body":"I know this is a debatable issue, but I'd like to raise it anyway. Whenever the Serverless 1.0-style CloudFormation stack is removed and recreated, API endpoint URLs also change. This is very undesirable when those URLs have been configured e.g. into front-end web applications and other integration points who expect the URLs to remain constant.\r\n\r\nThis might (?) not be an issue when using API Gateway Custom Domains. However, API Gateway doesn't support ACM certificates, so in many cases it's necessary to use the \"raw\" API Gateway endpoint URLs. It's not really convenient to use Let's Encrypt certificates either. I also think that even with Custom Domains, an admin needs to remap everything manually.\r\n\r\nI never include persistent resources in my own CloudFormation stacks for this reason. I exclude things like Route 53 configuration, DynamoDB tables, S3 buckets, etc. because removing and recreating them along with the stack always causes pain and problems in CloudFormation. I only include transient and easily recreatable things like SQS queues, SNS topics, IAM policies etc.\r\n\r\nThis is why I would also urge Serverless to exclude the API Gateway APIs from the CloudFormation stack and instead manage them manually, as was done in Serverless 0.5. This would let users keep their endpoint URLs forever.\r\n\r\n(I have also 'complained' about a similar problem when deleting the Serverless 1.0-created CloudFormation stack from AWS Console. Manual delete fails because a non-empty S3 bucket is included in the stack, causing aforementioned pain and problems. This is why I would also exclude the S3 bucket from CloudFormation. It's anyway a bad idea to create dozens of buckets, when the default resource limit is 100 buckets per account.)\r\n\r\nSo what I'd like to communicate, with several years of AWS experience, is this: It's not a good idea to put everything in CloudFormation, even if it's technically possible."},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/245920100","html_url":"https://github.com/serverless/serverless/issues/2074#issuecomment-245920100","issue_url":"https://api.github.com/repos/serverless/serverless/issues/2074","id":245920100,"user":{"login":"flomotlik","id":132653,"avatar_url":"https://avatars.githubusercontent.com/u/132653?v=3","gravatar_id":"","url":"https://api.github.com/users/flomotlik","html_url":"https://github.com/flomotlik","followers_url":"https://api.github.com/users/flomotlik/followers","following_url":"https://api.github.com/users/flomotlik/following{/other_user}","gists_url":"https://api.github.com/users/flomotlik/gists{/gist_id}","starred_url":"https://api.github.com/users/flomotlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flomotlik/subscriptions","organizations_url":"https://api.github.com/users/flomotlik/orgs","repos_url":"https://api.github.com/users/flomotlik/repos","events_url":"https://api.github.com/users/flomotlik/events{/privacy}","received_events_url":"https://api.github.com/users/flomotlik/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T13:56:35Z","updated_at":"2016-09-09T13:56:35Z","body":"I agree that its a balance that we need to make happen to on the one side use good defaults so you can make implementing small services (although I think the better term would be smaller companies) use Serverless, but at the same time also make Serverless usable by large companies and enterprises that have very stringent security and control requirements.\r\n\r\nBut I do think Serverless should promote good defaults and best practices, e.g. not having too many API Gateways for every small service as it will make all of your services public to the world. While that might be convenient, its not something we should promote imho. \r\n\r\n>If AWS in general would require a CloudFormation template for every project (and force developers to interact through CF updates instead of AWS Console or CLI), it would make development very jarring, because CF is designed more for ops than dev.\r\n\r\nThis is true, but AWS is a multi-billion dollar company with thousands of developers maintaining all this. We can't replicate this easily and the former implementation of going through the API was a huge blocker for many features and for contributions.\r\n\r\nWe should absolutely keep the conversation on how best to use CF open, find different ways to make this better (e.g. nested stacks), but I just want to make it very clear (so there are no misunderstandings) that we have no intention of moving away from CF. I don't want this to be understood as killing the conversation about it, just want to make our point of view clear so there are no misunderstandings."}}
{"actor":{"display_login":"flomotlik"}}