AWS and Ionic Team Up In Starter Project
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, FacebookGoogle+ or Linkedin.

 

Banner


Codecademy Introduces More Paid Options
22/08/2017

Codecademy, which offers online courses that feature interactive coding exercises, has added a variety of options for obtaining help from humans. New Codecademy Pro Intensive courses are coming on lin [ ... ]



Fluid Passwords - Never The Same Password
08/09/2017

Despite lots of predictions that passwords are on their way out, they still form the basis of most security. The problem is that even with strict rules about changing them, passwords tend to persist f [ ... ]


More News

 
 

 

blog comments powered by Disqus

Last Updated ( Thursday, 18 May 2017 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.