-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFN template in yaml or json format #1904
Comments
@timoteialbu Thanks for the feedbacks. |
Thanks, looking forward to your response. |
Any update on this? Can we use YAML for our custom stacks yet in Amplify? UPDATE: You can also install cfn-flip (it is an AWS managed utility) to convert YAML to JSON. I keep my YAML files in ./amplify/backend/{category}/{name}/stacks-yaml, and then before I run an Hope this ultimately gets in there in an automated fashion, but for now, this works! |
@kevinc1984 That's exactly what I do. Convert to yaml, make my changes and then convert back. It would just be nice to support both, since amplify could do that conversion on their side, merge the JSON stuff and then output it back into the format I had. |
FWIW I'm using YAML for my custom stacks right now (since 4.0.0) and it "just works" |
@rowanu what do you mean "just works"? I put a
|
I created a custom stack template in YAML, and put it in the path |
@rowanu that doesn't do anything for me. You're sure it is deployed?If it is, it's because something else going on on your system. |
The only other steps I followed were those for custom CloudFormation stacks in the CLI docs 🤷♂ |
YAML didn't work for me either, using Amplify CLI 4.16.1. It failed with:
I resorted to conversion from YAML to JSON before build, with automation so it's seamless, using "postinstall" in package.json:
where
|
Still not working entirely on Amplify 4.29. Works with push, not with publish:
I have a |
Closing in favor of existing feature request - Feature request: Use YAML for all CloudFormation files. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Is your feature request related to a problem? Please describe.
I like to use yaml whenever possible. Its shorter to write and easier on the eyes.
Describe the solution you'd like
I would like for the CLI so support the yaml format, particularly for the cloudfront hosting.
The yaml templates work up to a point, like I can update the cloudfront with it, but when it gets to the step where it publishes my react app it fails. It says it cannot find a
template.json
file, which is true since I have atemplate.yaml
file.The "issue" is on this line: https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-category-hosting/lib/S3AndCloudFront/index.js#L120
If you guys could have a file reader that works for both yaml and json that would be great.
Describe alternatives you've considered
Alternatives would be to go back to JSON, which is what I will do in the meantime. But it would be nice to have this feature, cause you guys say that formats are not enforced: #1286 (I know its related to Cognito there)
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: