I like the friendly interface that AWS Mobile Hub provides to disparate Amazon services, but I'd like to use it to create a web application, rather than a native iOS or Android app.
It's not clear to me how to do so, since there's no option for javascript sample code or any mention of web applications:
Am I missing something? Is there documentation for this use-case elsewhere?
All of the resources that are configured by various features in Mobile Hub (e.g., NoSQL Database, Cloud Logic APIs) are usable directly from a web app in the browser. For example, you can turn on the App Content Delivery feature, enable web hosting on your Amazon S3 bucket, download/copy the AWS JavaScript SDK into your Amazon S3 bucket, and start writing your web app. The JavaScript SDK will allow you to interact with your Mobile Hub resources (found on the "Resources" page in the left Nav menu in Mobile Hub's console).
However, we do realize these steps are tedious and we have had similar feedback from other customers. So, we are actively working to make these steps easier.
In the meantime, you can get the AWS JavaScript SDK here:
https://aws.amazon.com/sdk-for-browser/
And, you may find some of our github samples are a good starting point, like this one:
https://github.com/awslabs/lambda-refarch-webapp
For those looking to build web apps, AWS has a JavaScript library called AWS Amplify that makes building cloud web apps easy: https://aws.github.io/aws-amplify/
Related
Hi I was wondering if it was possible to host my flutter Web app on Firebase while using AWS Amplify for its DataStore and Cognito services or does AWS NOT support Flutter Web at all yet. Im having issues hosting it on Amplify and was wondering if there were any solutions.
After you build it, a Flutter web app is just a bunch of HTML and JavaScript, so you can serve it from any hosting platform. And once the JavaScript runs in the browser, it can connect to any service.
If you're having trouble making something work, we can typically help better if you show us the minimal information that is needed to reproduce where you are stuck.
I'm new with AWS mobile hub and today I just notice there is a new AWS Amplify/CL, now I'm super confused with these two libs.
My understanding was AWS mobile cli is a tool that create aws backend service, and amplify js just client library that hook up with the aws backend.
But now I see this AWS Amplify/CLI, it also can create aws service and also creates the aws-exports.js file, and now AWS Amplify docs has changed, it no longer tell you how would it works with mobile hub, instead use Amplify/CLI to create services.
Dose it mean I should use AWS Amplify/CLI instead?
Use the Amplify CLI going forward, it's more flexible architecture that allows a comprehensive feature set. See the information in this post:
Existing Mobile Hub projects continue to work without requiring any app changes. If you’re using the AWS Mobile CLI for existing projects, you can also continue to use that older CLI. However, going forward, new features will be added to the AWS Amplify CLI toolchain which does not use Mobile Hub.
If you’re building a new mobile or web app, or adding cloud capabilities to brownfield apps, use the new AWS Amplify CLI. The new Amplify CLI will allow you to take advantage of all the new features outlined in this blog, as well as the rich CloudFormation functionality to unlock more workflows and future tooling.
Section: Existing tooling, https://aws.amazon.com/blogs/mobile/announcing-the-aws-amplify-cli-toolchain/
For current Mobile Hub users, we just released a Mobile Hub to Amplify CLI migrator that you can access here: https://github.com/awslabs/amplify-mobilehub-migrator. This will help you import your Mobile Hub resources into an Amplify project, give you an exports file, and allow you to leverage Amplify CLI features such as GraphQL APIs, Codegen, and the GraphQL Transform.
Update - AWS Mobile Hub will be replaced by AWS Amplify on October 30, 2021. Existing users should plan a migration strategy. For apps already deployed with Mobile Hub, resources created by Mobile Hub will continue to function.
"If you don't migrate your project to Amplify, your app will continue to function, and all your related cloud resources will continue to be available. However, you won't be able to access the Mobile Hub project container after October 15, 2021." - https://docs.aws.amazon.com/aws-mobile/latest/developerguide/what-is-aws-mobile.html#migrate-to-amplify
Does Amplify support the Offline capabilities outlined here:
https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-react.html#offline-settings
Should I set it up like this?
https://aws.github.io/aws-amplify/media/api_guide#configuration-for-graphql-server
Or for offline capabilities, do I have to use something like Apollo?
There is a difference between AWS Amplify and AWS App Sync.
AWS Amplify is a library for web and mobile developement in JavaScript providing better access to AWS services like Auth, Analytics, Storage, APIs, Caching.
AWS AppSync is a combination of service that works as a GraphQL server and SDK (for web, iOS and Android). This SDK extends Apollo Client to provide capabilities like Offline and Realtime synchronization out of the box.
So, to answer your question: AWS AppSync does provide offline via its SDK out of the box and you shouldn’t need to do anything specifically to set up that.
I would like to add Amazon services to my CodeName one App, I have downloaded java-SDK from Amazon and added a library to my App. Everything working properly in simulator once I gave Android build.
If I try to access Amazon AWS in my android app I'm getting an error like "NoClassDefFoundError".
Here my question is CodeName one supports Amazon AWS or not.
If Codename One supports integration with Amazon AWS then how can I integrate and use below AWS services
Amazon Cognito,
Amazon Cognito Sync,
Amazon API Gateway,
Amazon DynamoDB,
AWS Device Farm,
Amazon SNS(Simple Notification Service),
Amazon Analytics.
You can't just add an arbitrary JAR to Codename One, because we don't support all the features of Java SE as explained here.
There are two ways in which you can support Amazon and you can see samples of both approaches in the libraries section of Codename One.
Wrap the native Android/iOS libraries - there is a long tutorial for this here and in the developer guide.
Wrap the webservice/JSON API's which is a better approach in many regards as it is 100% portable and will bring you into platforms like UWP, Desktop, Web etc. This is the approach taken by parse4cn1.
Option 2 is superior for solutions like AWS as it's much easier to debug and doesn't require any native code etc. Ideally we'd love to have a proper AWS cn1lib similarly to the parse cn1lib.
I am a new developer to the AWS cloud. I am writing an Android App that interfaces with the SimpleDB. I have found many references and have successfully interfaced my app with the SimpleDB using the AWS SDK and using the anonymous TVM - works great.
The problem is I will need a web site to interface to the same data via AWS SimpleDB. The web site also needs to interface with Google Maps. For the first phase, the site can be completely private, but down the road I would want to be able to make the site available to the public, utilizing one set of security Credentials.
After reading some of the documentation - I am extremely confused about how to do this. Do I need to host the site on AWS? Which API do I use that could interface with my web site code-mostly JQUERY and JavaScript? I see there is a PHP API? (Not too familiar with PHP) I saw some examples using REST calls via AJAX. If anyone has any feedback or simple examples, or explanations that would be great.
Yes, you should host your web site on an EC2 instance (although you can host it on any other server or hosting service).
Your site should also integrate with AWS services, like SimpleDB or DynamoDB.
It will be easier for you to start with Node.js that will run your JQuery and other JavaScript code natively. Check out the new SDK for Node.js.
If you have a static site of mostly js and HTML, you can use amazon s3 to host your site.