awslabs / amplify-video

An open source Category Plugin for the AWS Amplify-CLI that makes it easy to deploy live and file based streaming video services and integrate them into your Amplify applications.
https://www.npmjs.com/package/amplify-category-video
Apache License 2.0
267 stars 56 forks source link

Failure to amplify push after upgrading version #252

Closed danielvouch closed 3 years ago

danielvouch commented 3 years ago

Describe the bug Upgrading from version 3.2.1 to 3.5.0 I receive the following error when amplify pushing

UPDATE_FAILED rCloudfrontDistribution AWS::CloudFormation::Stack Wed Apr 28 2021 17:12:16 GMT+1000 (Australian Eastern Standard Time) Template format error: YAML not well-formed. (line 52, column 3)

To Reproduce Create an amplify video project on version 3.2.1 and push the environment, after successfully deploying upgrade to 3.5.0 and amplify push.

See above error!

Expected behavior Amplify push successfully

Desktop (please complete the following information):

wizage commented 3 years ago

Known issue. We are working with the CLI team to fix this. In the meantime, we can confirm that 4.49.0 of the Amplify CLI is working.

wizage commented 3 years ago

Fix is in the pipeline: https://github.com/aws-amplify/amplify-cli/pull/7220

danielvouch commented 3 years ago

Thanks @wizage !

wizage commented 3 years ago

Fix should be live in Amplify CLI version 4.50.2

Closing

danielvouch commented 3 years ago

@wizage Just upgraded packages now and still getting the same error

UPDATE_FAILED rCloudfrontDistribution AWS::CloudFormation::Stack Wed May 05 2021 08:41:13 GMT+1000 (Australian Eastern Standard Time) Template format error: YAML not well-formed. (line 52, column 3)

amplify -v 4.50.2 amplify video -v amplify-category-video@3.5.0

wizage commented 3 years ago

Confirmed that it works today.

Can you send over your YAML file in your s3 deployment bucket:

/amplify-cfn-templates/video/myvodstreams-vod-workflow-template.yaml
danielvouch commented 3 years ago

@wizage What's my best way to get it to you? I've updated to amplify 4.51.0 and amplify-category-video 4.6.0 and am still getting the same error.

Sorry about getting back to you so late, got distracted with some other stuff, completely forgot about this!

danielvouch commented 3 years ago

@wizage Our CFDistribution.Template file in the build directory is as follows, you can see at line 52 there's no field name before the colon.

Description: CloudFront Distribution for output bucket

Parameters:
  pBucketUrl:
    Type: String
    Description: ProjectName
    Default: DefaultName
  pOriginAccessIdentity:
    Type: String
    Description: Policy for bucket
    Default: NA

  pProjectName:
    Type: String
    Description: Name for public key
    Default: PublicKey

Resources:
  rCloudFrontDist:
    Type: AWS::CloudFront::Distribution
    Properties:
      DistributionConfig:
        DefaultCacheBehavior:
          ForwardedValues:
              QueryString: false
              Cookies:
                Forward: none
              Headers:
                - 'Origin'
                - 'Access-Control-Request-Method'
                - 'Access-Control-Request-Headers'
          AllowedMethods:
            - GET
            - HEAD
            - OPTIONS
          TargetOriginId: "vodS3Origin"
          ViewerProtocolPolicy: "allow-all"

          TrustedKeyGroups:
            - !Ref rCloudFrontKeyGroup

        Origins: 
          - 
            DomainName: !Ref pBucketUrl
            Id: vodS3Origin
            S3OriginConfig:
              OriginAccessIdentity: !Sub "origin-access-identity/cloudfront/${pOriginAccessIdentity}"
        Enabled: 'true'
        PriceClass: PriceClass_All

  :
    Type: AWS::CloudFront::PublicKey
    Properties:
      PublicKeyConfig:
        CallerReference: 
        Name: 
        EncodedKey: ""
  rCloudFrontKeyGroup:
    Type: AWS::CloudFront::KeyGroup
    Properties:
      KeyGroupConfig:
        Name: !Sub "${pProjectName}-KeyGroup"
        Items:
            - !Ref 

Outputs:

  oPemId:
    Value: !Ref 
    Description: Pem Key Id

  oCFDomain:
    Value: !GetAtt rCloudFrontDist.DomainName
    Description: Domain for our videos
danielvouch commented 3 years ago

@wizage Sorry for the spam - It's working now rather than choosing the leave as configured option, we changed to use rotating keys and are no longer getting the issue.