Switch to cognito user/password authentication. Major code refactor - Fix 4
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m21s
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m21s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Destroy infrastructure
|
# Destroy infrastructure
|
||||||
cdk destroy
|
cdk destroy --force
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from aws_cdk import (
|
from aws_cdk import (
|
||||||
Duration,
|
Duration,
|
||||||
|
RemovalPolicy,
|
||||||
Stack,
|
Stack,
|
||||||
aws_ec2 as ec2,
|
aws_ec2 as ec2,
|
||||||
aws_iam as iam,
|
aws_iam as iam,
|
||||||
@@ -114,7 +115,8 @@ class IptvUpdaterStack(Stack):
|
|||||||
require_symbols=True,
|
require_symbols=True,
|
||||||
require_uppercase=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
|
# Add App Client with the correct callback URL
|
||||||
@@ -153,7 +155,7 @@ class IptvUpdaterStack(Stack):
|
|||||||
userdata.add_commands(
|
userdata.add_commands(
|
||||||
f'echo "COGNITO_USER_POOL_ID={user_pool.user_pool_id}" >> /etc/environment',
|
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_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'))
|
userdata.add_commands(str(userdata_file, 'utf-8'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user