The usage of the Visual Studio Code editor is optional.
If you decide to use another editor, you need, at least, to
install Poetry for the rest of the tutorial. Otherwise,
feel free to adapt the pyproject.toml file to your tool of choice.
When you open the scaffold inside VS Code, a prompt asks you if you
want to continue developing in a container. Choose Reopen in Container
and wait for it to become ready.
The scaffold comes with an example.py file located in src/helloworld
that contains the following infrastructure description.
from ingraph.aws import Asset, aws_iam, aws_lambda
It creates an AWS Lambda function that returns a "Hello, World!"
message. To provide the actual code of the Lambda function, we use an
asset to reference the content of the handler.js file located in
We can use the InGraph CLI to translate from the InGraph DSL to the
AWS CloudFormation YAML template.
ig cfn -i helloworld.example -r Example -o build/example.yaml
In helloworld.example, helloworld is the name of your package
located in src and example is the name of your module located in
The CLI creates a build folder with a file named example.yaml that
contains your AWS CloudFormation template.