AWS Resources enable us to create AWS services as pydantic objects, completing our vision of writing software, application and infrastructure code entirely in python.

Examples

S3 Bucket

Copy the following code to a file resources.py and run phi start resources.py to create a bucket called my-bucket-885.

Make sure to delete the bucket using phi stop resources.py

Secret Manager

Copy the following code to a file resources.py and run phi start resources.py to create a secret called my-secret.

Read the secret in another file called read_my_secret.py

Run this file using python read_my_secret.py.

Delete the secret using phi stop resources.py