• Sunday

    • Private work.
    • Installed java8 on macbook.
    • AppSync.
      • AWS’ serverless graphql api tool. Like apigateway for rest.
      • Define schema, test queries in the interactive console, custom domains, everything you’d expect.
      • Really nice for cases where you’re combining data from multiple sources: rdb, lambda, http apis, etc.
    • Played with graphql.
    • Ordered all friendsgiving stuff.
    • Amplify E2E.
      • Install amplify cli (npm pkg in your app). Created IAM user, added amplify-admin policy, created access key, configured CLI to auth with that user. These are stored in ~/.aws/credentials. You can have multiple local profiles. ~/.aws/config is there too, which defines zone and such.
      • Use the cli to init. Deploys resources to support amplify. Like creating a new app in amplify studio.
      • Install npm pkg aws-amplify for frontend libs.
      • amplify add api, define type (graphql/rest), define auth (key, cognito, etc), define schema. It can also autogenerate code for you (CRUD operations, like graphql mutations/queries, rest gets/posts, etc).
      • amplify push for just backend, amplify publish for both backend and frontend.
      • CloudFormation is obviously the default provider that amplify’s CLI uses for creating/managing the cloud resources. For the API, AppSync is used for GraphQL and APIGateway is used for REST.
      • amplify console api opens up your API’s console in the browser (the aws ui), appsync for graphql and apigateway for rest. amplify console opens up the full console (amplify studio).
      • amplify mock api will spin up a local graphiql server to test your api (interactively). I think it spins up a local db too so you’re not writing to the cloud db.
      • Testing the app locally (npm start) will still connect to your cloud db! Make sure it’s in the env you desire. For dev, have a dev setup (duh).
      • amplify add auth. Define some cognito basics (federation/socials, un/ph/em/pw, etc). Then you just add some components / auth wrappers to your frontend.
      • Then users can create accounts, confirm email, login, etc. Everything you wanna do. These changes are synced with cognito. Played with this a bit.
      • There are many other components in @aws-amplify/ui-react. You can use these, style them, customize them, combine them with yours, whatever.
      • Add hosting. You can use amplify native to host a node env where the app runs, or you can do a custom setup with cloudfront and s3. Amplify just speeds a lot of this up for you (while still using cf and s3 under the hood), and allows CD by plugging into your git repo, etc.
      • publish will gzip the assets and deploy an optimized production build to your hosting env. I’m sure you can customize this to use whatever bundlers/minifiers you want.
      • REST.
        • You basically add paths and corresponding serverless functions. These go to API gateway and lambda.
        • You can separately have unauthed paths and authed paths. The authed paths integrate with cognito.
      • For amplify add storage, you only have s3 and dynamodb options.
    • Lambda layers are reusable bits of code/assets available to other functions. Imagine a python module you wanna import to two lambdas. Or a node_modules dir you wanna use across multiple functions.
    • Supercontest.
      • Pinpoint’s tollfree registration finally came back (after 2 weeks) and said “company website is not accessible” (bullshit). Updated/resubmitted the registration to /user/register to make it obvious…that of course the site requires login. That’s literally the point of the registration process, to affirm user flows before comms are provided.