aws-sam-cli

SAM Template - API Authorizor to use existing Cognito User Pool

妖精的绣舞 提交于 2021-02-11 18:20:19
问题 UPDATE: Thanks for the help! I've updated the template.yml to include the Authorizer, but I'm getting an error still: HelloWorldApi: Type: AWS::Serverless::Api Properties: StageName: Prod Cors: "'*'" # Auth: # DefaultAuthorizer: MyCognitoAuthorizer # Authorizers: # MyCognitoAuthorizer: # UserPoolArn: arn:aws:cognito-idp:us-east-1:719235216593:userpool/my-user-pool-id HelloWorldFunction: Properties: CodeUri: hello-world/ Handler: app.lambdaHandler Runtime: nodejs10.x Events: HelloWorld: Type:

SAM Template - API Authorizor to use existing Cognito User Pool

北慕城南 提交于 2021-02-11 18:18:17
问题 UPDATE: Thanks for the help! I've updated the template.yml to include the Authorizer, but I'm getting an error still: HelloWorldApi: Type: AWS::Serverless::Api Properties: StageName: Prod Cors: "'*'" # Auth: # DefaultAuthorizer: MyCognitoAuthorizer # Authorizers: # MyCognitoAuthorizer: # UserPoolArn: arn:aws:cognito-idp:us-east-1:719235216593:userpool/my-user-pool-id HelloWorldFunction: Properties: CodeUri: hello-world/ Handler: app.lambdaHandler Runtime: nodejs10.x Events: HelloWorld: Type:

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

Can't run AWS SAM CLI under Docker

☆樱花仙子☆ 提交于 2021-02-06 13:51:29
问题 I'm trying to create a Docker image for AWS SAM CLI, but invoking any function gives an error: "Unable to import module 'index'". I can run the same test case outside of Docker sucessfully. You can clone the test case here or see the files below. I already tried the following: Setting permissions of files and parent folder to 777 (or 755). Disabling SELinux in the Docker daemon (or enabling it). Running Docker under privileged mode (or not). I get the same error using an old (SAM 0.22) Docker

Can't run AWS SAM CLI under Docker

不羁岁月 提交于 2021-02-06 13:49:02
问题 I'm trying to create a Docker image for AWS SAM CLI, but invoking any function gives an error: "Unable to import module 'index'". I can run the same test case outside of Docker sucessfully. You can clone the test case here or see the files below. I already tried the following: Setting permissions of files and parent folder to 777 (or 755). Disabling SELinux in the Docker daemon (or enabling it). Running Docker under privileged mode (or not). I get the same error using an old (SAM 0.22) Docker

Can't run AWS SAM CLI under Docker

ⅰ亾dé卋堺 提交于 2021-02-06 13:48:30
问题 I'm trying to create a Docker image for AWS SAM CLI, but invoking any function gives an error: "Unable to import module 'index'". I can run the same test case outside of Docker sucessfully. You can clone the test case here or see the files below. I already tried the following: Setting permissions of files and parent folder to 777 (or 755). Disabling SELinux in the Docker daemon (or enabling it). Running Docker under privileged mode (or not). I get the same error using an old (SAM 0.22) Docker