Switch to cognito user/password authentication. Major code refactor - Fix 4
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m21s

This commit is contained in:
2025-05-16 13:39:29 -05:00
parent 127d81adac
commit 0b69ffd67c
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
# Destroy infrastructure
cdk destroy
cdk destroy --force

View File

@@ -1,6 +1,7 @@
import os
from aws_cdk import (
Duration,
RemovalPolicy,
Stack,
aws_ec2 as ec2,
aws_iam as iam,
@@ -114,7 +115,8 @@ class IptvUpdaterStack(Stack):
require_symbols=True,
require_uppercase=True
),
account_recovery=cognito.AccountRecovery.EMAIL_ONLY
account_recovery=cognito.AccountRecovery.EMAIL_ONLY,
removal_policy=RemovalPolicy.DESTROY
)
# Add App Client with the correct callback URL
@@ -153,7 +155,7 @@ class IptvUpdaterStack(Stack):
userdata.add_commands(
f'echo "COGNITO_USER_POOL_ID={user_pool.user_pool_id}" >> /etc/environment',
f'echo "COGNITO_CLIENT_ID={client.user_pool_client_id}" >> /etc/environment',
f'echo "COGNITO_CLIENT_SECRET={client.user_pool_client_secret.plain_text}" >> /etc/environment'
f'echo "COGNITO_CLIENT_SECRET={client.user_pool_client_secret.to_string()}" >> /etc/environment'
)
userdata.add_commands(str(userdata_file, 'utf-8'))