Replies: 4 comments 5 replies
-
If you want to use API Gateway, please refer to this documentation If you want to use Lambda Urls, you can take a look at this article https://www.serverless.com/blog/aws-lambda-function-urls-with-serverless-framework In any case, this will deployed as part of the If you have more detailed questions, feel free to ask 🙂 |
Beta Was this translation helpful? Give feedback.
-
I'd suggest following this guide: https://bref.sh/docs/first-steps.html |
Beta Was this translation helpful? Give feedback.
-
Hello, Karl's coworker here. Let me add a little more information. We have an API built on the laravel framework that we're currently deploying to AWS just fine, but what we're looking for is to use a custom domain name, and have it setup automatically via the deploy process instead of having to manually set it up within the AWS console. We currently get a url from the deploy along the lines of https://{uniqueid}.amazonaws.com/ but we want to use https://api.{ourdomain}.com. We've tried setting this up manually in the AWS console using the information here: Custom domain names - Bref but depending on how we set it up we get various errors and nothing has worked so far. Additionally, we'd like to have this configured during the deploy process via the serverless.yml (or where ever it needs to be setup) so that we don't have to do this manually. However, we've found zero information on how that can be achieved, if it's even possible. Thanks for any help you can provide. |
Beta Was this translation helpful? Give feedback.
-
I'll answer as a top-level answer instead of a comment due to the size of my comment. For me it's very common to deploy a custom domain with AWS Lambda, but for some backend-only projects, it's not uncommon to use the domain provided by AWS.
Let's start with 1: I just want a custom domain in front of my service. Although it sounds simple, AWS forces us to: The fact that nowadays http:// is unacceptable and custom domains require a custom certificate, the process isn't as straight forward as one would hope. To make matters worse, AWS used to provide only manual validation of certificates (via Email) or manual validation by requiring a human to provision the correct DNS validation. Only more recently tools to automatically validate the DNS were made available so it's not uncommon to find lots of information on the internet requiring manual steps. As for 2) Imagine you have more than 1 project on your company and/or domain. Maybe you have a frontend team app.mycompany.com and a backend team at api.mycompany.com. Maybe you even have a data engineering team with insights.mycompany.com. Notice how they all share the same domain, only different subdomain? Domain is often considered an account-bound resource and not just project specific. Do you want your frontend team app.mycompany.com to be "the owner" of the domain? What if they are restructuring their project and suddenly they bring your entire domain down? Your CI/CD for a specific project/github repository may not be the best place to put DNS provisioning information. Domains are created only once and never again. You do not want to reprovision DNS on every deployment. Your CI/CD should rely on deploying based on existing account-level infrastructure, but how will that look like heavily depends on your infrastructure. Terraform, CloudFormation and Serverless all provide different forms to do this. Hope this clarifies some things and shed some light on why it appears to be simple on the surface but it's quite complicated. Btw, I have heard from many people that they solve this problem by simply singing up for a free CloudFlare account and forgetting about it. |
Beta Was this translation helpful? Give feedback.
-
Trying to figure out how to define public endpoints to my deployed lambda module in aws via (I'm assuming) serverless.
I see a small mention of this in the documentation but remains unclear to me where to obtain a clear description on how to go about this.
I understand it involves some configuration through the api gateway, and my attempts to manually configure through the aws console have not succeeded. I'm hoping to be able to do this via our github action deployment process? Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions