Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

establish a process/way of setting up different dev environments for everyone #365

Closed
ezl opened this issue May 18, 2020 · 1 comment
Closed
Assignees

Comments

@ezl
Copy link
Collaborator

ezl commented May 18, 2020

No description provided.

@aldarund
Copy link
Collaborator

for cognito:

  1. set stage in conf/dev.env to a new string. convention dev-
  2. npm install
  3. npm run sls:deploy-dev
    4
  4. set values in conf/dev.env for

COGNITO_POOL_ID=us-east-1_V2o1PH7j9

from the cognito deploy output
if not output in sls:deploy-dev output, then log in to AWS, go to cognito -> user pools to find it.
from this output, save requestLogin endpoint for nuxt env

for mail processing

  1. update conf/dev.env STAGE_NAME to match
  2. npm run sls:deploy-dev

now for appsync:

  1. set values in conf/dev.env for

COGNITO_POOL_ID=us-east-1_V2o1PH7j9
COGNITO_IDENTITY_POOL_ID=us-east-1:ee2ecfaf-3d28-4496-9206-e0a51d6f3295
COGNITO_POOL_WEB_CLIENT_ID=2vhfj30qvkgs3frbrgl2n3lecf (identity pools -> app integration -> app client settings)

from the cognito deploy output
if not output in sls:deploy-dev output, then log in to AWS, go to cognito -> user pools to find it.

  1. set stage to same string as in cognito dev.env

  2. npm install

  3. npm run sls:deploy-dev

Two problems we ran into here.
(A) computer time. if your computer time isn't synced, it can cause errors when deploying
An error occurred: GraphQlApiKeyDefault - API key can be valid for a maximum of 365 days. (Service: AWSAppSync; Status Code: 400; Error Code: ApiKeyValidityOutOfBoundsException; Request ID: 567b9233-2619-4803-abc7-6c950a194644).
Somehow if your computer is in the future, then subsequent request happens outside the valid time window so the deploy fails.

(B) stage name gets prepended to function names. there's at least one function name that is 61 characters long, so we can only add 3 characters in the stage, otherwise we break the function name max length limit of 64 characters. #419

take this to the nuxt app

In conf/local.env, update the following:
AWS_REGION (probably the same)
APPSYNC_API_KEY
APPSYNC_ENDPOINT
(these 2 come from the output of sls:deploy-dev on appsync)

REQUEST_LOGIN_ENDPOINT
(this comes from the output of sls:deploy-dev on cognito (in back/users))

COGNITO_POOL_ID
COGNITO_IDENTITY_POOL_ID
COGNITO_POOL_WEB_CLIENT_ID
(these 3 are the same as the ones used in front/appsync/conf/dev.env)

@ezl ezl pinned this issue Jun 25, 2020
@ezl ezl closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants