diff --git a/apps/pre-award/copilot/environments/addons/basic-auth-cloudfront-function.yml b/apps/pre-award/copilot/environments/addons/basic-auth-cloudfront-function.yml index 03a795b..8486af1 100644 --- a/apps/pre-award/copilot/environments/addons/basic-auth-cloudfront-function.yml +++ b/apps/pre-award/copilot/environments/addons/basic-auth-cloudfront-function.yml @@ -16,7 +16,7 @@ Resources: FunctionCode: !Sub | function handler(event) { - const username = ${!SSM[/copilot/${App}/${Env}/secrets/BASIC_AUTH_USERNAME} + const username = '{{resolve:ssm-secure:/copilot/${App}/${Env}/secrets/BASIC_AUTH_USERNAME}}' // NOTE: This example function is for a viewer request event trigger. // Choose viewer request for the event trigger when you associate this function with a distribution. var response = {