/aws-services-authorizer

Lambda Function for custom authorizer in API Gateway

Primary LanguagePython

Custom Authorizer

Lambda Function for custom authorizer in API Gateway

aws-services

How To Setup a CodePipeline

Launch Stack

Input Parameter Values

  • CloudformationLambdaExecutionRoleArn:

    Enter ARN of IAM Role for Cloudformation to create changesets and target stack. If you already created one or more CodePipeline that uses Cloudformation, this role should have been created already, so you can use the same role, 'cloudformation-lambda-execution-role'. If not, please create a role with the same name with Trust Relationships and Policy Document defined here.

  • CodePipelineServiceRoleArn:

    Enter ARN of IAM Role for CodePipeline to be executed. If you already created one or more CodePipeline, this role should have been created already, so you can use the same role, 'AWS-CodePipeline-Service'. If not, please create a role with the same name with Trust Relationships and Policy Document defined here.

  • CustomAuthorizerIAMRoleName:

  • CustomAuthorizerLambdaName:

  • EncryptionLambdaName:

    Enter the NAME (not ARN) of the encryption Lambda Function. If you didn't already deployed the Encryption Lambda Function, see here to deploy the Lambda Function to Encrypt Environment Variables.

  • GitHubPersonalAccessToken:

    Access Token for CodeBuild to access to the this Github repository. (See here to find how to generate the access token).

  • GitHubSourceRepositoryBranch: master

  • GitHubSourceRepositoryName: aws-services-authorizer

  • GitHubSourceRepositoryOwner: SungardAS

  • ParameterOverrides: { "SSOHost": "sso_host", "SSOBasicAuthUsername": "sso_user", "SSOBasicAuthPassword": "sso_password", "SSOMasterToken": "sso_master_token" }

  • ProjectImage: aws/codebuild/python:2.7.12

How To Test Lambda Functions

  • $ cd tests
  • Export environment variables, SSO_HOST, SSO_BASIC_AUTH_USERNAME, SSO_BASIC_AUTH_PASSWORD, SSO_MASTER_TOKEN
  • Replace <username> and <password> with proper values in 'test.py'
  • $ python test.py

Sungard Availability Services | Labs

This project is maintained by the Labs group at Sungard Availability Services

GitHub: https://sungardas.github.io

Blog: http://blog.sungardas.com/CTOLabs/