amazon-archives / aws-appsync-relay

A sample Relay app using AWS AppSync
MIT No Attribution
59 stars 12 forks source link

Cannot deploy to AWS CloudFormation #2

Open danielcai1987 opened 4 years ago

danielcai1987 commented 4 years ago

Hi Kelvin,

When I try to do the 2nd step of Launching the AppSync backend aws cloudformation deploy --template-file packaged_template.yml --stack-name AppSyncRelay --capabilities CAPABILITY_NAMED_IAM

I receive the following error:

unacceptable character #x0000: special characters are not allowed
  in "<unicode string>", position 3

When I try to upload the .\backend\template.yml file in CloudFormation Designer, after clicking Validate template button, there is an error: Template contains errors.: Template error: YAML aliases are not allowed in CloudFormation templates

danielcai1987 commented 4 years ago

I've managed to create a CloudFormation stack by doing:

  1. Run the first step: aws cloudformation package --template-file backend/template.yml --s3-bucket my-package-bucket > packaged_template.yml
  2. Copy/paste the content of .\backend\template.yml file to CloudFormation Designer
  3. Replace the GraphQLSchema section with the content of packaged_template.yml
  4. Convert to JSON format in CloudFormation Designer to avoid YAML aliases not allowed issue.
  5. Create stack

Now I can run it at my local. Thank you 👍