aws-samples / aws-serverless-airline-booking

Airline Booking is a sample web application that provides Flight Search, Flight Payment, Flight Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD. This web application was the theme of Build on Serverless Season 2 on AWS Twitch running from April 24th until end of August in 2019.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when deploying: API key must be valid for a minimum of 1 days

heitorlessa opened this issue · comments

Problem

New deployments are failing due to an old API key setting that Amplify Console doesn't seem to be picking up. This issue tracks the resolution and potentially reverting dual-authorization setting.

2022-03-22T09:06:31.717Z [INFO]: DELETE_COMPLETE          authawsserverlessairline44ea6421        AWS::CloudFormation::Stack Tue Mar 22 2022 09:06:30 GMT+0000 (Coordinated Universal Time)
                                 UPDATE_ROLLBACK_COMPLETE amplify-awsserverlessairline-devf-85837 AWS::CloudFormation::Stack Tue Mar 22 2022 09:06:31 GMT+0000 (Coordinated Universal Time)
2022-03-22T09:06:47.249Z [INFO]: Following resources failed
                                 Resource Name: GraphQLAPIKey (AWS::AppSync::ApiKey)
                                 Event Type: create
                                 Reason: API key must be valid for a minimum of 1 days. (Service: AWSAppSync; Status Code: 400; Error Code: ApiKeyValidityOutOfBoundsException; Request ID: 1d752afe-7c47-42fe-b4e3-fcfed28f51a1; Proxy: null)
2022-03-22T09:06:47.251Z [WARNING]: ✖ An error occurred when pushing the resources to the cloud
                                    ✖ There was an error initializing your environment.

Root cause: aws-amplify/amplify-cli#4460

Next. Upgrade Amplify-CLI, reconfigure Auth (remove, re-add API Key). Failing that, set API Key to 2 days. Failing that somehow, then use CDK extension

Amplify-CLI upgraded to 6.4.0 - last release before major breaking changes in GraphQL and in AuthZ model. It's deploying successfully now. However, I'll wait until tomorrow to confirm whether the new apiKeyExpirationDate field added doesn't impact deploys in future dates - If so, we'll have to replace API Key with AWS_IAM AuthZ option for v2 e2e tests.

ff11056

Thank you for creating this issue.

The issue is being closed because the project will no longer use Amplify