Skip to content

chrisbonifacio/cpkc-demo

Repository files navigation

Amplify Gen 2 + RDS Postgres

Data

To start the sandbox for local development run the following command:

npx ampx sandbox

In another terminal, set your Postgres database's connection string as a secret for the current sandbox in Parameter Store by running the following command:

npx ampx sandbox secret set SQL_CONNECTION_STRING
npx ampx generate schema-from-database --connection-uri-secret SQL_CONNECTION_STRING --out amplify/data/schema.sql.ts

The data schema assumes your database has a table with the following schema:

create table notifications
(
    user_id varchar(40)  not null,
    id      varchar(40)  not null
        constraint notifications_pk
            primary key,
    message varchar(255) not null
);

Auth

  1. Replace the metadata url in the amplify/auth folder with your SAML provider's when using the URL metadata type. Or, you can provide the contents of the metadata file and use the FILE metadata type instead.
  2. Configure your SAML Provider's Entity ID in the following format urn:amazon:cognito:sp:<user_pool_id>
  3. Add the cognito domain as a Callback URL in the format https://<your_user_pool_domain>.auth.<region>.amazoncognito.com/saml2/idpresponse.

This page is helpful for troubleshooting invalid SAML responses: https://repost.aws/knowledge-center/cognito-invalid-saml-response-errors

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published