I used the exact same terraform code that you use and I can hit the lambda through api gateway, but if I try it through the dns domain name, then I get a 404 not found.. Any ideas?
Hi @AntonPutra. First of all, thank you for your videos! But maybe, you could also give me a hint what I'm doing wrong. When I tried to run your tf scripts for creating API gateway custom domain name, it gave me an error related to validation error in lambda func name. Which is weird, there should not be created any lambda func during creation of custom domain name IMHO. But then I tried to make the same operation but from aws cli: aws apigatewayv2 create-domain-name \ --domain-name "${DOMAIN_NAME}" \ --domain-name-configuration CertificateArn="${CERTIFICATE_ARN}",EndpointType=REGIONAL,SecurityPolicy=TLS_1_2 And again, it gave me the following error: An error occurred (BadRequestException) when calling the CreateDomainName operation: {"message": "1 validation error detected: Value \'arn:aws:lambda:me-central-1:614065512701:function:\' at \'functionName\' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_\\.]+)(:(\\$LATEST|[a-zA-Z0-9-_]+))?"} Moreover '614065512701' this is even not my aws account id... Any help is appreciated. Thank you in advance!
🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
Oh My God. I have been spending hours trying to get my head around this and you were able to explain it in 10 minutes!
Wow so fast explained. You rock as always!!
Thanks :)
👉 How to Manage Secrets in Terraform - th-cam.com/video/3N0tGKwvBdA/w-d-xo.html
👉 Terraform Tips & Tricks - th-cam.com/video/7S94oUTy2z4/w-d-xo.html
👉 ArgoCD Tutorial - th-cam.com/video/zGndgdGa1Tc/w-d-xo.html
Thank you so much! it works in seconds i was reading aws documentation for 1 hour and still no match lol i think i need more practice.
Glad it helped!
thanks
that's help
welcome!
Thank you so much for the video
It's my pleasure
I used the exact same terraform code that you use and I can hit the lambda through api gateway, but if I try it through the dns domain name, then I get a 404 not found.. Any ideas?
make sure you enabled dns - github.com/antonputra/tutorials/blob/main/lessons/145/terraform/1-vpc.tf#L4-L5
Hi @AntonPutra.
First of all, thank you for your videos!
But maybe, you could also give me a hint what I'm doing wrong.
When I tried to run your tf scripts for creating API gateway custom domain name, it gave me an error related to validation error in lambda func name.
Which is weird, there should not be created any lambda func during creation of custom domain name IMHO.
But then I tried to make the same operation but from aws cli:
aws apigatewayv2 create-domain-name \
--domain-name "${DOMAIN_NAME}" \
--domain-name-configuration CertificateArn="${CERTIFICATE_ARN}",EndpointType=REGIONAL,SecurityPolicy=TLS_1_2
And again, it gave me the following error:
An error occurred (BadRequestException) when calling the CreateDomainName operation: {"message": "1 validation error detected: Value \'arn:aws:lambda:me-central-1:614065512701:function:\' at \'functionName\' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_\\.]+)(:(\\$LATEST|[a-zA-Z0-9-_]+))?"}
Moreover '614065512701' this is even not my aws account id...
Any help is appreciated.
Thank you in advance!
Okay, looks like I found the reason, api gateway v2 is still not working in me-central-1, but v1 does work.
ok thanks for the update