Getting started
Prerequisites
- Prefect installed.
- An AWS account and the necessary permissions to access desired services.
Install prefect-aws
Install or update to the latest version of the prefect-aws library and dependencies.Register newly installed block types
Register the block types in the prefect-aws module to make them available for use.Examples
Run flows on AWS ECS
Run flows on AWS Elastic Container Service (ECS) to dynamically scale your infrastructure. See the ECS work pool docs for a walkthrough of using ECS in a hybrid work pool. If you’re using Prefect Cloud, ECS push work pools provide all the benefits of ECS with a quick setup and no worker needed. In the examples below, you create blocks with Python code. Alternatively, each block can be created through the Prefect UI.Save credentials to an AWS Credentials block
Use of most AWS services requires an authenticated session. Prefect makes it simple to provide credentials via a AWS Credentials block. Steps:- Refer to the AWS Configuration documentation to retrieve your access key ID and secret access key.
- Copy the access key ID and secret access key.
- Create an
AWSCredenitals
block in the Prefect UI or use a Python script like the one below.
AwsCredentials
block with AWS Secrets Manager with third-party services without storing credentials in the block itself in the docs.
Here’s how to load the saved credentials:
S3Bucket
or AwsSecret
, and provides authentication for those services.