Read the blog about the architecture and components deployed by this implementation
-
Configure your AWS CLI with the credentials to access your account. Check out the different options in the AWS Documentation if needed.
-
Create an S3 bucket to store Terraform state. It shouldn't be covered by lifecycle rules.
-
Go to
terraform.tfvars
, uncomment and replace values to match your environment. -
Go to
locals.tf
and update the values to match your environment. -
Save your changes.
- From the CLI, go to the
environments/aws
folder and initialize the Terraform/OpenTofu backend
terraform init
- Generate an especulative execution plan:
terraform plan -out=flyte-plan
- Apply changes:
terraform apply flyte-plan
A successful execution should produce a single endpoint
output.
- Go to your local config file (typically
$HOME/.flyte/config.yaml
) and configure it to point to theendpoint
URL:
admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: dns:///flyte.example.run #
authType: Pkce
insecure: false
- Save the following "hello world" workflow definition:
cat <<<EOF >hello_world.py
from flytekit import task, workflow
@task
def say_hello() -> str:
return "hello world"
@workflow
def my_wf() -> str:
res = say_hello()
return res
if __name__ == "__main__":
print(f"Running my_wf() {my_wf()}")
EOF
- Execute the workflow on the Flyte cluster:
pyflyte run --remote hello_world.py my_wf
Example output:
Go to https://flyte.example.run/console/projects/flytesnacks/domains/development/executions/f4b064c7341014ded929 to see execution in the console.
- Go to the console and verify the succesful execution:
Congratulations!
You have a fully working Flyte environment on AWS.
From this point on, you can continue your learning journey by going through the Getting started guide.