aws-amplify / aws-amplify/docs

Add documentation of how custom runtime function (python) in Amplify Gen 2, can interact with Amplify Data (just like in typescript functions)

Open
#8,214 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
MDX
Stars
506
Forks
1.1k
Avg merge
3h 14m
Merged PRs (30d)
1

Description

**Describe the content issue**:
In this PR:
https://github.com/aws-amplify/amplify-backend/pull/1602
Custom functions runtime was added to Amplify Gen 2.
The docs about it are in:
https://docs.amplify.aws/nextjs/build-a-backend/functions/custom-functions/#python

Can you also please add documentation about how a Python function can interact with the Amplify Data?
For example how to create/update/read/delete a table in Amplify Gen 2 Data.

In a typescript function, according to this docs:
https://docs.amplify.aws/nextjs/build-a-backend/functions/examples/create-user-profile-record/
It's possible to interact with Amplify Data using the "client" object:

![Image](https://github.com/user-attachments/assets/573f61b2-595e-40cd-a883-fd6459987cb5)

Is it possible to do something similar in a **python** function? (if yes, can you please 🙏 provide example)

If not, in a typescript function it's also possible to interact with the Amplify Data with GraphQL (as you mentioned) like this:

![Image](https://github.com/user-attachments/assets/ad1a2401-2c66-40d3-8bc5-7e7c7b321950)

Can you please 🙏 provide an example of how to do this in a **python** Amplify function?

Contributor guide

Open the contributing guide

Research direction

Start with the Python section of the custom functions documentation and the linked PR #1602, then compare it with the TypeScript create-user-profile example. Document whether Python functions can use the Amplify Data client or GraphQL, including create, read, update, and delete examples, and verify that the finished guidance fits the existing Amplify Gen 2 documentation structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql, python
Domain
backend-api-design, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.