Open13

Flutter Amplify

jksanjksan

Authのプロジェクトの有無で見るのが一つ
てかamplify消してたら紐づけてるbackend全てがダメになるか
→ とすると、configurationしているものから、認証もあれになるので(まぁamplify消しといてauthだけ単体で残ってコストかかるのも意味がわからんし)
てかそうしたケースの場合、例えばauthが障害で疎通できなくなった時、そうなる?
→ まぁ厳密的にエラーで振り分けるしかないだろうな

jksanjksan
amplify init --profile amplify-dev
Note: It is recommended to run this command from the root of your app directory
? Do you want to use an existing environment? Yes
? Choose the environment you would like to use: dev
Using default provider  awscloudformation
✖ Initializing your environment: dev
✖ There was an error initializing your environment.
🛑 Could not find a deployment bucket for the specified backend environment. This environment may have been deleted.

Resolution: Make sure the environment has been initialized with "amplify init" or "amplify env add".
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: 944d8d22-5f0b-4890-82d0-2a185e6e3a25

✅ Report saved: 
✔ Done

Project Identifier: 9a9d06ee76e9f859ba99c7e3fc759eda
jksanjksan
amplify env <subcommands>
  add                                                                              Adds a new environment to your Amplify Project                                                                                                                                          
  pull [--restore]                                                                 Pulls your environment with the current cloud environment. Use the restore flag to overwrite your local backend configs with that of the cloud.                                         
  checkout <env-name> [--restore]                                                  Moves your environment to the environment specified in the command. Use the restore flag to overwrite your local backend configs with the backend configs of the environment specified. 
  list [--details] [--json]                                                        Displays a list of all the environments in your Amplify project                                                                                                                         
  get --name <env-name> [--json]                                                   Displays the details of the environment specified in the command                                                                                                                        
  import --name <env-name> --config <provider-configs> [--awsInfo <aws-configs>]   Imports an already existing Amplify project environment stack to your local backend                                                                                                     
  update [--permissions-boundary <IAM Policy ARN>]                                 Update the environment configuration                                                                                                                                                    
  remove <env-name>                                                                Removes an environment from the Amplify project                 
jksanjksan
$ amplify update api                                                                                                                                                                          30.3s  日  1/28 12:20:28 2024
? Select from one of the below mentioned services: GraphQL

General information
- Name: hoge

Authorization modes
- Default: API key

Conflict detection (required for DataStore)
- Disabled

? Select a setting to edit Authorization modes
? Choose the default authorization type for the API Amazon Cognito User Pool
Use a Cognito user pool configured as a part of this project.
? Configure additional auth types? No
⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): BudgetEntry: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
✅ GraphQL schema compiled successfully.

Edit your schema at ./amplify/backend/api/hoge/schema.graphql or place .graphql files in a directory at ./amplify/backend/api/hoge/schema
⚠️ The API_KEY auth type has been removed from the API.
⚠️ If other resources depend on this API, run "amplify update <category>" and reselect this API to remove the dependency on the API key.
⚠️ This must be done before running "amplify push" to prevent a push failure
✅ Successfully updated resource

$ amplify push
⠏ Building resource api/hoge⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): BudgetEntry: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
✅ GraphQL schema compiled successfully.

Edit your schema at ./amplify/backend/api/hoge/schema.graphql or place .graphql files in a directory at ./amplify/backend/api/hoge/schema
✔ Successfully pulled backend environment develop from the cloud.
⠇ Building resource api/hoge⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): BudgetEntry: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
✅ GraphQL schema compiled successfully.

Edit your schema at ./amplify/backend/api/hoge/schema.graphql or place .graphql files in a directory at ./amplify/backend/api/hoge/schema

    Current Environment: develop
    
┌──────────┬────────────────┬───────────┬───────────────────┐
│ Category │ Resource name  │ Operation │ Provider plugin   │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Auth     │ hoge4d9c17d1 │ Create    │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Api      │ hoge         │ Create    │ awscloudformation │
└──────────┴────────────────┴───────────┴───────────────────┘
✔ Are you sure you want to continue? (Y/n) · yes
⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): BudgetEntry: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
✅ GraphQL schema compiled successfully.

Edit your schema at ./amplify/backend/api/hoge/schema.graphql or place .graphql files in a directory at ./amplify/backend/api/hoge/schema
⠧ Building resource api/hoge⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): BudgetEntry: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
✅ GraphQL schema compiled successfully.

Edit your schema at ./amplify/backend/api/hoge/schema.graphql or place .graphql files in a directory at ./amplify/backend/api/hoge/schema

Deployment completed.
Deployed root stack hoge [ ======================================== ] 3/3
        amplify-hoge-develop-115201  AWS::CloudFormation::Stack     UPDATE_COMPLETE                Sun Jan 28 2024 12:24:09…     
        authhoge4d9c17d1             AWS::CloudFormation::Stack     CREATE_COMPLETE                Sun Jan 28 2024 12:22:29…     
        apihoge                      AWS::CloudFormation::Stack     CREATE_COMPLETE                Sun Jan 28 2024 12:24:05…     
Deployed auth hoge4d9c17d1 [ ======================================== ] 6/6
        UserPool                       AWS::Cognito::UserPool         CREATE_COMPLETE                Sun Jan 28 2024 12:22:00…     
        UserPoolClientRole             AWS::IAM::Role                 CREATE_IN_PROGRESS             Sun Jan 28 2024 12:21:58…     
        UserPoolClientWeb              AWS::Cognito::UserPoolClient   CREATE_COMPLETE                Sun Jan 28 2024 12:22:03…     
        UserPoolClient                 AWS::Cognito::UserPoolClient   CREATE_COMPLETE                Sun Jan 28 2024 12:22:03…     
        IdentityPool                   AWS::Cognito::IdentityPool     CREATE_COMPLETE                Sun Jan 28 2024 12:22:05…     
        IdentityPoolRoleMap            AWS::Cognito::IdentityPoolRol… CREATE_COMPLETE                Sun Jan 28 2024 12:22:08…     
Deployed api hoge [ ======================================== ] 5/5
        GraphQLAPI                     AWS::AppSync::GraphQLApi       CREATE_COMPLETE                Sun Jan 28 2024 12:22:36…     
        GraphQLAPITransformerSchema3C… AWS::AppSync::GraphQLSchema    CREATE_COMPLETE                Sun Jan 28 2024 12:22:50…     
        GraphQLAPINONEDS95A13CF0       AWS::AppSync::DataSource       CREATE_COMPLETE                Sun Jan 28 2024 12:22:39…     
        BudgetEntry                    AWS::CloudFormation::Stack     CREATE_COMPLETE                Sun Jan 28 2024 12:23:38…     
        CustomResourcesjson            AWS::CloudFormation::Stack     CREATE_IN_PROGRESS             Sun Jan 28 2024 12:23:39…     

Deployment state saved successfully.

GraphQL endpoint: https://ozelcrd7hndgrg5ofgat37z5im.appsync-api.ap-northeast-1.amazonaws.com/graphql

GraphQL transformer version: 2