AWS Note
What does this page say#
- All AWS related, mainly Amplify (till 2021-09-26)
- Chapters are chronologically ordered, assumably, also from easy to difficult.
Two-days trip on AWS customizing#
- @2021-09-19
- AWS and amplify use different users
- Amplify creates an assumed role, and it seems not possible to log out. So can't change users.
- Amplify assumed role is also in the role list. Role list can have more than one page.
- Not any Cognito User Pool can be used in Amplify (via
amplify import auth). To use for "Pool and Identities", need to have a "Federated Identities" as well. InvalidParameterException,Cannot perform specific action because there does not exist a valid use pool domain associated with the user pool: action here is means verification email not sent or some more thing, but the account is already created.
Amplify automatically login after sign-up#
- @2021-09-20
- verify & confirm are different things.
- Use a Pre-Sign Up Lambda trigger to set
event.response.autoConfirmUser = true - Following this
GHanswer, values are here
Amplify use @aws-amplify/cli@latest#
- @2021-09-20
- After upgrading Amplify CLI from v4 to v6.0.0, need to mannually set Env. Var. like this
GHanswer - Additional: For error
Cannot find file './aws-exports' in './src', check thisSOanswer, see AWS Doc
Amplify Accessing Environment variables#
- @2021-09-26
- Solution: On Amplify-backend: See
Q3,Q4below. Locally, please commend this answer on "How to add environment variables to AWS amplify?", and also this one on "Adding an .env file to React Project" which refers to Adding Custom EV - Amplify remote EV not tested @2021-09-26
- Environment variables, short as EV in this chapter.
- It is said in the Environment variables page:
As a best practice, you can use environment variables to expose these configurations. All environment variables that you add are encrypted to prevent rogue access, so you can use them to store secret information.
- Also, it is shown how to access EV after publish(seems broken?), but did'nt tell us how we can read them from a local test build.
- seems broken for these questions on
SO - Q1:How to add environment variables to AWS amplify?
- Q2:Amplify save environment variables to backend
- seems broken for these questions on
- Many questions on
SObut few are answered.- Q3:How to use AWS Amplify environment variables in React app?
- Q4:How to add environment variables to AWS amplify?, by the way, we don't have to use "secrets manager" when hosting on Amplify. The AWS Systems Manager console on EV Page actually does the same job, with free pricing plan.
- @2021-09-26
- Tested Amplify remote EV, in build settings, both way(with/without
{}works). - Made a PR on official doc