Skip to content

Commit

Permalink
Merge pull request #8 from FIAP-3SOAT-G15/feature-auth-authorizer
Browse files Browse the repository at this point in the history
Fix (auth-authorizer): renaming aws_region variable
  • Loading branch information
mateus3009 authored Mar 19, 2024
2 parents 28847e5 + c97318a commit 1fc4fc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/auth-authorizer/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from urllib.request import urlopen


AWS_REGION = os.environ.get('REGION')
REGION = os.environ.get('REGION')
USER_POOL_ID = os.environ.get('USER_POOL_ID')
APP_CLIENT_ID = os.environ.get('CLIENT_ID')

KEYS_URL = f'https://cognito-idp.{AWS_REGION}.amazonaws.com/{USER_POOL_ID}/.well-known/jwks.json'
KEYS_URL = f'https://cognito-idp.{REGION}.amazonaws.com/{USER_POOL_ID}/.well-known/jwks.json'
KEYS = requests.get(KEYS_URL).json()['keys']

def lambda_handler(event, context):
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ module "lambda_auth_authorizer" {
source_path = "../src/auth-authorizer"

environment_variables = {
AWS_REGION = var.region
REGION = var.region
USER_POOL_ID = aws_cognito_user_pool.user_pool.id
CLIENT_ID = aws_cognito_user_pool_client.client.id
}
Expand Down

0 comments on commit 1fc4fc1

Please sign in to comment.