aws-api-gateway

AWS Custom Authorizer IAM Authentication

江枫思渺然 提交于 2021-02-07 10:11:47
问题 I've searched the internet but didn't find a solution so hopefully somebody can give me a hint. I have a federated identity pool with a configured facebook authorizer. The API Gateway currently uses the IAM Auth to allow access for authenticated users. This is works fine, but I need to make a few db queries to check if the user is really allowed to access the endpoint (Check groups, roles in my db etc.). Now my idea was to use a custom authorizer, because I don't want to call my user service

How can I change the name of the API stage in a SAM template?

Deadly 提交于 2021-02-07 07:15:31
问题 I'm using SAM to deploy a Lambda function and make it callable over HTTP with via API Gateway using roughly this template snipplet: MyFunction: Type: AWS::Serverless::Function Properties: … Events: MyApi: Type: Api Properties: Path: / Method: any This works, but it creates an API stage called "Prod", which has to be used as a prefix for all URLs. I don't want my URLs to be "https://something/Prod/foo", I want them to be "https://something/v1/foo", i.e. something that I choose. How do I change

How can I change the name of the API stage in a SAM template?

假装没事ソ 提交于 2021-02-07 07:14:15
问题 I'm using SAM to deploy a Lambda function and make it callable over HTTP with via API Gateway using roughly this template snipplet: MyFunction: Type: AWS::Serverless::Function Properties: … Events: MyApi: Type: Api Properties: Path: / Method: any This works, but it creates an API stage called "Prod", which has to be used as a prefix for all URLs. I don't want my URLs to be "https://something/Prod/foo", I want them to be "https://something/v1/foo", i.e. something that I choose. How do I change

How can I change the name of the API stage in a SAM template?

半世苍凉 提交于 2021-02-07 07:11:05
问题 I'm using SAM to deploy a Lambda function and make it callable over HTTP with via API Gateway using roughly this template snipplet: MyFunction: Type: AWS::Serverless::Function Properties: … Events: MyApi: Type: Api Properties: Path: / Method: any This works, but it creates an API stage called "Prod", which has to be used as a prefix for all URLs. I don't want my URLs to be "https://something/Prod/foo", I want them to be "https://something/v1/foo", i.e. something that I choose. How do I change

How can I change the name of the API stage in a SAM template?

放肆的年华 提交于 2021-02-07 07:10:17
问题 I'm using SAM to deploy a Lambda function and make it callable over HTTP with via API Gateway using roughly this template snipplet: MyFunction: Type: AWS::Serverless::Function Properties: … Events: MyApi: Type: Api Properties: Path: / Method: any This works, but it creates an API stage called "Prod", which has to be used as a prefix for all URLs. I don't want my URLs to be "https://something/Prod/foo", I want them to be "https://something/v1/foo", i.e. something that I choose. How do I change

How can I change the name of the API stage in a SAM template?

混江龙づ霸主 提交于 2021-02-07 07:07:36
问题 I'm using SAM to deploy a Lambda function and make it callable over HTTP with via API Gateway using roughly this template snipplet: MyFunction: Type: AWS::Serverless::Function Properties: … Events: MyApi: Type: Api Properties: Path: / Method: any This works, but it creates an API stage called "Prod", which has to be used as a prefix for all URLs. I don't want my URLs to be "https://something/Prod/foo", I want them to be "https://something/v1/foo", i.e. something that I choose. How do I change

Redirect http:// requests to https:// on AWS API Gateway (using Custom Domains)

守給你的承諾、 提交于 2021-02-07 04:42:08
问题 I'm using AWS API Gateway with a custom domain. When I try to access https ://www.mydomain.com it works perfectly, but when i try http ://www.mydomain.com it can't connect. Is there a way to redirect the http -> https with the custom domain in API Gateway? If not, is there a way to get the http:// links to work just like the https:// links? 回答1: API Gateway doesn't directly support http without TLS, presumably as a security feature, as well as for some practical considerations. There is not a

Can I use AWS API Gateway as a reverse proxy for a S3 website?

六眼飞鱼酱① 提交于 2021-02-07 04:23:11
问题 I have a serverless website on AWS S3. But S3 have a limitation that I want to overcome: it don't allow me to have friendly URLs. For example, I would like to replace URL: www.mywebsite.com/user.html?login=daniel With this URL friendly: www.mywebsite.com/user/daniel So, I would like to know if I can use Lambda together with API Gateway to achieve this. My idea is: API Gateway ---> Lambda function ---> fetch S3 resource The API Gateway will get ANY request, and pass information to a Lambda

S3 Hosting + Api Gateway

大憨熊 提交于 2021-02-07 02:38:10
问题 I'm trying to host a static site in S3 with ability to handle some dynamic content using Lambda/Api Gateway. Can't seem to be able to do that. I want URLs to look like this: example.com/index.html example.com/images/* example.com/css/* example.com/api/* -> API Gateway Also, when redirecting I'd like to keep the example.com as a root domain. I tried RoutingRules in S3, but redirects from the client. I need this to be transparent from the user, like proxying requests. 回答1: You can configure

Best Way to Monitor Customer Usage of AWS Lambda

偶尔善良 提交于 2021-02-05 08:46:27
问题 I have newly created an API service that is going to be deployed as a pilot to a customer. It has been built with AWS API Gateway, AWS Lambda, and AWS S3. With a SaaS pricing model, what's the best way for me to monitor this customer's usage and cost? At the moment, I have made a unique API Gateway, Lambda function, and S3 bucket specific to this customer. Is there a good way to create a dashboard that allows me (and perhaps the customer) to detail this monitoring? Additional question, what's