Skip to content

Latest commit

 

History

History
72 lines (58 loc) · 2.38 KB

File metadata and controls

72 lines (58 loc) · 2.38 KB

Flyte on AWS

Read the blog about the architecture and components deployed by this implementation

Customize your deployment

  1. Configure your AWS CLI with the credentials to access your account. Check out the different options in the AWS Documentation if needed.

  2. Create an S3 bucket to store Terraform state. It shouldn't be covered by lifecycle rules.

  3. Go to terraform.tfvars, uncomment and replace values to match your environment.

  4. Go to locals.tf and update the values to match your environment.

  5. Save your changes.

Prepare for deployment

  1. From the CLI, go to the environments/aws folder and initialize the Terraform/OpenTofu backend
terraform init
  1. Generate an especulative execution plan:
terraform plan -out=flyte-plan
  1. Apply changes:
terraform apply flyte-plan

A successful execution should produce a single endpoint output.

  1. Go to your local config file (typically$HOME/.flyte/config.yaml) and configure it to point to the endpoint URL:
admin:
  # For GRPC endpoints you might want to use dns:///flyte.myexample.com
  endpoint: dns:///flyte.example.run #
  authType: Pkce
  insecure: false
  1. 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
  1. 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.
  1. 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.