Back to home

Expo Amplify main image

Expo Amplify

npm install --global awsmobile-cli awsmobile configure # follow configure prompts yarn add aws-amplify aws-amplify-react-native awsmobile init awsmobile user-signin enable # might be awsmobile user-signin enable --prompt # to open console awsmobile console


# Create awsmobile cloud-api invoke ServerlessExampleCRUD POST /ServerlessExample '{"body": {"ID": "1", "ItemDescription": "Description", "ItemName": "Item One", "ItemPrice": 99}}' # Another create awsmobile cloud-api invoke ServerlessExampleCRUD POST /ServerlessExample '{"body": {"ID": "2", "ItemDescription": "Description", "ItemName": "Item Two", "ItemPrice": 99, "userId": "dennisokeeffe"}}' # Get awsmobile cloud-api invoke ServerlessExampleCRUD GET /ServerlessExample/object/1 { ItemPrice: 99, ItemName: 'Item One', ID: '1', ItemDescription: 'Description', userId: 'UNAUTH' }

In code

This code will also ensure that only the user can see the info

// Create something only the user can see if user only on let create = await"ServerlessExampleCRUD", "/ServerlessExample", { body: { ID: "3", ItemDescription: "Description", ItemName: "Item Three", ItemPrice: 99, }, }); console.log(create); // Fetch if only user can fetch let counter = await API.get( "ServerlessExampleCRUD", "/ServerlessExample/object/3", {} ); console.log("> CounterOne.counter", counter);

Personal image

Dennis O'Keeffe

  • Melbourne, Australia

Hi, I am a professional Software Engineer. Formerly of Culture Amp, UsabilityHub, Present Company and NightGuru.
I am currently working on, Den Dribbles and LandPad .


Get fresh posts + news direct to your inbox.

No spam. We only send you relevant content.