PATH:
usr
/
local
/
jetapps
/
var
/
lib
/
aws
/
lib
/
python2.7
/
site-packages
/
awscli
/
examples
/
apigateway
**To create a token based API Gateway Custom Authorizer for the API** Command:: aws apigateway create-authorizer --rest-api-id 1234123412 --name 'First_Token_Custom_Authorizer' --type TOKEN --authorizer-uri 'arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations' --identity-source 'method.request.header.Authorization' --authorizer-result-ttl-in-seconds 300 Output:: { "authType": "custom", "name": "First_Token_Custom_Authorizer", "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations", "authorizerResultTtlInSeconds": 300, "identitySource": "method.request.header.Authorization", "type": "TOKEN", "id": "z40xj0" } **To create a Cognito User Pools based API Gateway Custom Authorizer for the API** Command:: aws apigateway create-authorizer --rest-api-id 1234123412 --name 'First_Cognito_Custom_Authorizer' --type COGNITO_USER_POOLS --provider-arns 'arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_aWcZeQbuD' --identity-source 'method.request.header.Authorization' Output:: { "authType": "cognito_user_pools", "identitySource": "method.request.header.Authorization", "name": "First_Cognito_Custom_Authorizer", "providerARNs": [ "arn:aws:cognito-idp:us-east-1:342398297714:userpool/us-east-1_qWbZzQhzE" ], "type": "COGNITO_USER_POOLS", "id": "5yid1t" }
[-] get-resource.rst
[edit]
[-] get-integration-response.rst
[edit]
[-] create-domain-name.rst
[edit]
[-] delete-method.rst
[edit]
[-] create-api-key.rst
[edit]
[-] get-rest-apis.rst
[edit]
[-] create-deployment.rst
[edit]
[-] update-client-certificate.rst
[edit]
[-] delete-stage.rst
[edit]
[-] delete-rest-api.rst
[edit]
[-] update-base-path-mapping.rst
[edit]
[-] create-stage.rst
[edit]
[-] update-stage.rst
[edit]
[-] get-integration.rst
[edit]
[-] update-model.rst
[edit]
[-] flush-stage-cache.rst
[edit]
[-] update-resource.rst
[edit]
[-] update-method-response.rst
[edit]
[-] delete-model.rst
[edit]
[+]
..
[-] create-usage-plan-key.rst
[edit]
[-] get-domain-names.rst
[edit]
[-] delete-resource.rst
[edit]
[-] put-rest-api.rst
[edit]
[-] delete-api-key.rst
[edit]
[-] update-rest-api.rst
[edit]
[-] delete-base-path-mapping.rst
[edit]
[-] update-account.rst
[edit]
[-] test-invoke-method.rst
[edit]
[-] get-usage-plan-keys.rst
[edit]
[-] get-authorizers.rst
[edit]
[-] delete-method-response.rst
[edit]
[-] update-api-key.rst
[edit]
[-] update-usage.rst
[edit]
[-] create-base-path-mapping.rst
[edit]
[-] put-method-response.rst
[edit]
[-] update-authorizer.rst
[edit]
[-] create-rest-api.rst
[edit]
[-] create-model.rst
[edit]
[-] flush-stage-authorizers-cache.rst
[edit]
[-] get-account.rst
[edit]
[-] get-method.rst
[edit]
[-] get-models.rst
[edit]
[-] get-usage.rst
[edit]
[-] get-export.rst
[edit]
[-] get-domain-name.rst
[edit]
[-] delete-deployment.rst
[edit]
[-] get-client-certificate.rst
[edit]
[-] get-rest-api.rst
[edit]
[-] get-usage-plans.rst
[edit]
[-] create-resource.rst
[edit]
[-] delete-authorizer.rst
[edit]
[-] generate-client-certificate.rst
[edit]
[-] update-method.rst
[edit]
[-] update-usage-plan.rst
[edit]
[-] get-base-path-mappings.rst
[edit]
[-] delete-usage-plan-key.rst
[edit]
[-] put-integration-response.rst
[edit]
[-] get-stage.rst
[edit]
[-] import-rest-api.rst
[edit]
[-] put-integration.rst
[edit]
[-] get-api-key.rst
[edit]
[-] get-model-template.rst
[edit]
[-] get-model.rst
[edit]
[-] delete-usage-plan.rst
[edit]
[-] get-stages.rst
[edit]
[-] get-authorizer.rst
[edit]
[-] delete-client-certificate.rst
[edit]
[-] get-resources.rst
[edit]
[-] delete-domain-name.rst
[edit]
[-] get-base-path-mapping.rst
[edit]
[-] get-sdk.rst
[edit]
[-] get-client-certificates.rst
[edit]
[-] get-method-response.rst
[edit]
[-] get-deployments.rst
[edit]
[-] delete-integration.rst
[edit]
[-] delete-integration-response.rst
[edit]
[-] update-deployment.rst
[edit]
[-] update-integration-response.rst
[edit]
[-] get-deployment.rst
[edit]
[-] test-invoke-authorizer.rst
[edit]
[-] create-usage-plan.rst
[edit]
[-] put-method.rst
[edit]
[-] get-usage-plan-key.rst
[edit]
[-] update-integration.rst
[edit]
[-] update-domain-name.rst
[edit]
[-] get-api-keys.rst
[edit]
[-] get-usage-plan.rst
[edit]
[-] create-authorizer.rst
[edit]