aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
185 stars 62 forks source link

feat: Add mis build to the data factory #2223

Open stocaaro opened 1 week ago

stocaaro commented 1 week ago

Problem

Users would like to use the Gen2 data client interface to access their APIs from application functions (lambda's).

Our docs offer instructions on this experience, which stop short of indicating how the customer should provide the model introspection schema needed to make the whole experience work.

Change

  1. Build the Model Introspection Schema (MIS) in the data factory
  2. Construct an S3 bucket with the MIS as an object
  3. Grant get permission to the MIS to any function that is granted resource permissions to the data schema
  4. Add the bucket name and object key for the MIS to SSM (where it will be read

In isolation, this change builds the MIS to S3 and grants permission, but the user story to consume this in a function would be complicated without the data config change that makes the in function configuration process trivial.

Corresponding docs PR, if applicable: https://github.com/aws-amplify/docs/pull/8096

Validation

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: d381f73bb29b918fc4540af4b31c1c0f9f077407

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------------- | ----- | | @aws-amplify/backend | Patch | | @aws-amplify/backend-data | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

stocaaro commented 6 days ago

Reverting to draft. This change has been merged into https://github.com/aws-amplify/amplify-backend/pull/2224