AWS and Ionic Team Up In Starter Project
Written by Nikos Vaggalis   
Thursday, 18 May 2017

Amazon is quick in recognizing that just offering support for a number of popular programing languages is not enough to lure hoards of developers to the platform. That's why we are seeing a move towards wrapping its AWS services with greater user-friendliness.

The start was made with the introduction of CodeStar, which aimed to simplify the setting up of a project's AWS infrastructure, especially  with regard to policy and authorization, as we examined in CodeStar to Simplify Development On AWS.




It continues this trend with the release of the open source Ionic AWS starter project Mobile Web and Hybrid Application which aims to act as a skeleton, or boilerplate, Ionic application tweaked in such a way to give developers a headstart in configuring their mobile Ionic front-end applications in relation to an AWS backend.

Amazon's new strategy towards streamlining its services is acknowledged by it officially admitting:

"Creating the backend services can be a time consuming and error prone endeavor."

which nowadays is certainly the case. A 'simple' but modern mobile app is not just about nice looking and usable UIs anymore, but in contrast it has to leverage quite a number of backend services for its needs, such as storage, databases, user management (sign-up, sign-in, identity, resource access control, and security), and messaging.

To ease this process, Amazon now enables developers to import just a single mobile-hub-project.zip file into its AWS Mobile Hub (Amazon's platform for mobile apps) console, an action which will automatically create a new Mobile Hub project and take care of the necessary configuration as well as the instantiation of all essential backend components, like Amazon Cognito for the user identity management, DynamoDB for the application data, S3 for the file storage, and Pinpoint for the analytics.

The prerequisites to get started are an Ionic CLI version of 3.x RC, (or install it with npm install -g ionic@latest) as well as the latest AWS CLI (or install it with pip install awscli/).

With these in place then you can continue in creating your Ionic Project with:

 ionic start myApp aws

After that, log into your AWS Mobile Hub account and import the 
mobile-hub-project.zip file (in essence a packed yml configuration file) which when loaded up will setup and configure, as already mentioned:

  • an Amazon Cognito User Pool for identity management, aka 'User Sign-in'

  • a single Amazon DynamoDB table called “ionic-mobile-hub-tasks” (since the boilerplate project is actually a 'to-do' app)

  • and an S3 bucket with resources such as aws-config.js, images and HTML files.

The last part is hooking up this configuration to the Ionic project you created in the beginning. You've now got to copy the generated aws-config.js file into your project's folder as well as copy the project's web assets residing in your myApp/www/ to the root of your S3 bucket.

To do this inside your Ionic project, run the following commands, substituting WEBSITE_BUCKET with the S3 content delivery bucket name that was created by the Mobile Hub project import.

npm run build aws s3 cp --recursive ./www s3://WEBSITE_BUCKET

You'll find more details on the project's official GitHub page.

 

 

More Information

Related Articles

Ionic Creator - Generate The Code

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


MongoDB 8 Reduces Memory Use And Increases Speed
07/10/2024

MongoDb 8 has been released, and the developers have said this is the most secure, durable, available, and performant version of MongoDB yet, with significantly reduced memory usage and query times, a [ ... ]



Microsoft Releases Azure AI Inference SDK For .NET
26/09/2024

Microsoft has introduced an Azure AI Inference SDK for .NET. The SDK can be used to access and use AI models from the Azure AI Model Catalog for inference tasks like chat in .NET applications.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 18 May 2017 )