4 ms·
Can we stop using YAML for configuration and instead use a real programming language with possibly a type interface and a compiler? So much time wasted looking
by msoad 8y ago
Can we stop using YAML for configuration and instead use a real programming language with possibly a type interface and a compiler? So much time wasted looking up possible configurations and worse, learning that some configuration will conflict with another.
- eahefnawy 8y agothis could be used programmatically as well via Serverless Components. However, if your configuration is simple, that's what YAML is made for.
- ac360 8y agoDone! This project can be deployed with YAML or programmatically w/ Javascript. Here is an example of a full Chat Application that demonstrates how you can provision and extend this Serverless Realtime Application Component programmatically, very much like a React Component. https://github.com/serverless-components/ChatApp/blob/master/serverless.js https://github.com/serverless-components/ChatApp/blob/master...
- tashoecraft 8y agoI heard a good reason why we shouldn't use a programming language for configuration as it can lead to incredibly custom setups that can be crazy difficult to upgrade or for new developers to understand what's going on.
- scarface74 8y agoThe purpose of CloudFormstion is not to tell AWS how to do something it’s to tell it the end state. How do you propose using a programming language where you can just change a resource and let the system figure out current state -> desired state and decide what needs to be created, updated, deleted, replaced? But there are CloudFormation Linters. https://marketplace.visualstudio.com/itemdetails?itemName=kddejong.vscode-cfn-lint https://marketplace.visualstudio.com/itemdetails?itemName=kd... And there is also the CF editor for Visual Studio. https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-cfn-editor.html https://docs.aws.amazon.com/toolkit-for-visual-studio/latest...
- eahefnawy 8y agoServerless Components keep track of all the resources it creates/updates and their properties locally in the .serverless directory. It also keeps it synced with the actual state of the resource on the provider (in case you've changed them in the console for example) So if you change the configuration, the component will be able to figure things out.
- scarface74 8y agoDoes Serverless handle all of the AWS resource types that you may need for your lambda?
- eahefnawy 8y agoYou can write your own component that handles whatever service you need and share it with the community. The more components that are built, the easier it'll be to write higher level components that use those. As of today, those are the available components: https://github.com/serverless-components https://github.com/serverless-components
- scarface74 8y agoI’ll be the first to admit that most of the missing resources would be useless for lambda. There are a few missing ones that might matter. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGui...
- ac360 8y ago@scarface74 Let us know what you need. We have about a dozen more coming out within the next week.
- scarface74 8y agoMost of the lambda related things I do are backend ETL and message processing. Is Serverless just for API use cases or does it support other event triggers like SNS and SQS or one of the patterns we use is S3 Event -> SNS -> SQS -> lambda and all of the related permissions and subscriptions. But then again, isn’t the whole purpose of using Serverless instead of SAM to be cloud vendor neutral? Once you add AWS specific resources doesn’t that go against the whole ideal of using Serverless?
- FakeComments 8y agoThat exists for AWS: https://github.com/awslabs/aws-cdk https://github.com/awslabs/aws-cdk