diff --git a/services/ui-src/serverless.yml b/services/ui-src/serverless.yml index f485f87bf..47a6d6f82 100644 --- a/services/ui-src/serverless.yml +++ b/services/ui-src/serverless.yml @@ -7,6 +7,12 @@ plugins: - serverless-s3-sync - serverless-s3-bucket-helper +provider: + name: aws + runtime: nodejs18.x + region: us-east-1 + stage: dev + custom: stage: ${opt:stage, self:provider.stage} api_region: ${cf:app-api-${self:custom.stage}.Region} @@ -20,6 +26,7 @@ custom: application_endpoint_url: ${cf:ui-${self:custom.stage}.CloudFrontEndpointUrl} cognito_user_pool_client_id: ${cf:ui-auth-${self:custom.stage}.UserPoolClientId} cognito_user_pool_client_domain: ${cf:ui-auth-${self:custom.stage}.UserPoolClientDomain} + ui_cloudfront_distribution_id: ${cf:ui-${self:custom.stage}.CloudFrontDistributionId} s3Sync: - bucketName: ${self:custom.ui_s3_bucket_name} @@ -47,11 +54,4 @@ custom: cp public/env-config.js build/env-config.js deploy:finalize: | set -e - aws cloudfront create-invalidation --region ${self:provider.region} --distribution-id ${param:CloudfrontDistributionId} --paths "/*" -# The `provider` block defines where your service will be deployed -provider: - name: aws - runtime: nodejs14.x - region: us-east-1 - stage: dev - + aws cloudfront create-invalidation --region ${self:provider.region} --distribution-id ${self:custom.ui_cloudfront_distribution_id} --paths "/*"