Skip to content

Deploying the Solution

The solution is developed using AWS Cloud Development Kit (CDK), TypeScript, & NodeJS

Prerequisites

  • You will need an AWS Account.

  • Either an IAM User or IAM Identity Center User with AdministratorAccess policy granted to your user. Not recommended for a production environment.

  • AWS CLI installed and configured to use with your AWS account.

  • NodeJS 20 installed

  • The ARN of your verified email identity that you will send newsletter emails from. You will also be asked to provide an email address that will be the sender, which must be associated with the verified email identity.

Deployment

  1. Clone the repository

    git clone https://github.com/aws-samples/generative-ai-newsletter-app/
  2. Change directory into the cloned repository

    cd generative-ai-newsletter-app
  3. Install the project dependencies & build the project

    npm install && npm run build
  4. Run the configuration wizard to create a deployment configuration file.

    npm run config manage

    The configuration wizard will generate a configuration file in bin/config.json. This file will be used during the deployment. Unless you need to change the configuration file, you do not need to run the configuration wizard for future deployments. If you change the Stack Name, it will cause a new deployment to occur.

  5. [Optional] Bootstrap AWS CDK on the target AWS Account & Region.

    Note: This is required if you have never used AWS CDK on this account and region combination. (More information on CDK bootstrapping).

  6. Deploy the solution

    npx cdk deploy

    You can view the progress of your CDK deployment in the CloudFormation console in the selected region.

  7. Once the deployment is complete, CDK should show outputs that resemble the following. (Note: terms in brackets represents a generated/dynamic value)

    ...
    Outputs:
    [stackName].AppLink = https://dxxxxxxxxxxxxx.cloudfront.net/
    [stackName].UserPoolLink = https://[region].console.aws.amazon.com/cognito/v2/idp/user-pools/xxxxx_XXXXX/users?region=[region]
    ...

    If you need these outputs again, you can view the deployment in the CloudFormation console by navigating to the deployed stack and visiting the "Outputs" tab.

Post Deployment Guidance

Once you have completed the deployment, follow the Post Deployment Guide.