Showing posts tagged with AWS

The Game Developers Conference (GDC) is the largest annual gathering of professional video game developers providing a place for the industry to collaborate, network and share best practices for creating compelling game experiences. This year Amazon hosted a full Developer Day with sessions that covered building Android games for our full line of devices, Amazon Echo, Fire Tablets, Fire TV and Fire Phone, how to build better cloud gaming experiences, reaching fans with Twitch, and applying in-app monetization best practices based on Amazon's IAP data.

These sessions were previously only available to GDC attendees, and we’re excited to announce that we’ve made all of the Amazon GDC Developer Day sessions freely available online. Enjoy!

An Overview of the Amazon Devices and Services for Game Developers David Isbitski, Developer Evangelist, Amazon Alf Tan, Head of Games Business Development, Amazon Vlad Suglobov, CEO, G5 Entertainment An overview of Amazon's current developer ecosystem. Learn how you can take advantage of AWS services specifically targeted for Game Developers, Amazon's Appstore and the new line of consumer Fire devices like Amazon Echo, Amazon Fire TV, Fire TV Stick and Fire tablets, as well as monetization services such as in-app purchasing. Plus, hear how G5 entertainment has had success on the Amazon platform from G5 CEO Vlad Suglobov.

Top Tips for Porting Unity Games to Fire DevicesJesse Freeman, Developer Evangelist, Amazon In this talk, we cover important tips for porting Unity games over to Fire TV, Fire tablets and Fire phone. Through code examples, we'll demo how to support multiple resolutions for pixel perfect Orthographic and Perspective Cameras, abstracting player input to support keyboard, controller and touch, and optimization tips for C# for the best performance. We'll also show how to deploy to our devices and get your game up and running on Fire OS. You'll walk away knowing what it takes to publish to the Amazon Appstore and help expand your game's user base.

How to Evolve Players into FansPeter Heinrich, Developer Evangelist, Amazon We’ve analyzed the top mobile games to see what best practices make them stand out from the crowd. Several trends emerging now will amplify those best practices, and games will have more opportunity than ever to excel. In the future, the top games will have fully realized fan bases that will drive their user acquisition and engagement engines. That fan base will include players but also content creators, advocates and potential new customers — this will open up a wider range of monetization options. Hear more about how top mobile games drive greater engagement and revenue and learn how to you can do this with your own game.

Build and Deploy Your Mobile Game with AWS Dhruv Thukral, Gaming Solutions Architect, AmazonTara Walker, Technical Evangelist, Amazon Developing a successful mobile game today is about more than just the game: Users expect backend services like user authentication, downloadable content, and social features. Using our AWS Mobile SDK for iOS and Android, it’s easier than ever to build a game with these services. This session will provide a step-by-step approach to add features to your game such as user identity management, dynamic content updates, cross-platform data sync, and more. We’ll demonstrate how to use the AWS Mobile SDK to securely interact with services such as Cognito, DynamoDB, S3, and EC2. Finally, we’ll provide a few common architecture patterns and scalability tips for AWS game backends.

How We Made a Game No FunMike Hines, Developer Evangelist, Amazon There are lots of suggestions about how to make a game fun. Best practices are everywhere, but you can't just follow them blindly. To create a fun game, you have to figure out how best practices integrate into your specific game. Watch what we did wrong, and what we learned along the way.

Connecting with Your Customers - Building Successful Mobile Games through the Power of AWS AnalyticsNate Wiger, Principal Gaming Solutions Architect, Amazon Free to play is now the standard for mobile and social games. But succeeding in free-to-play is not easy: You need in-depth data analytics to gain insight into your players so you can monetize your game. Learn how to leverage new features of AWS services such as Elastic MapReduce, Amazon S3, Kinesis, and Redshift to build an end-to-end analytics pipeline. Plus, we’ll show you how to easily integrate analytics with other AWS services in your game.

Deploying a Low-Latency Multiplayer Game Globally: Loadout3:30pm-4:15pmNate Wiger, Principal Gaming Solutions Architect, Amazon This is a deep-dive straight into the guts of running a low-latency multiplayer game, such as a first-person shooter, on a global scale. We dive into architectures that enable you to split apart your back-end APIs from your game servers, and Auto Scale them independently. See how to run game servers in multiple AWS regions such as China and Frankfurt, and integrate them with your central game stack. We’ll even demo this in action, using AWS CloudFormation and Chef to deploy Unreal Engine game servers.

How Game Developers Reach New Customers with Twitch 4:15pm-5:15pmMarcus Graham, Director of Community & Education at TwitchErnest Le, Director Publisher & Developer Partnerships at Twitch Twitch is the largest live video platform and community for gamers with more than 100 million visitors per month. We want to connect gamers around the world by allowing them to broadcast, watch, and chat from everywhere they play. In this session, learn how game developers are creating engaging experiences and reaching new customers via the Twitch platform.

Amazon Fire TV Games on Twitch

Garnett Lee and Tyler Cooper hosted a steam during GDC this year on Twitch. The guys were joined by representatives from 2K games for XCOM: Enemy Within, Tellate for Game of Thrones, Ep. 2, Tripwire for Killing Floor Calamity and ended the night with Hipster Whale and a Crossy Road competition! If you are a gamer interested in seeing first-hand what the current batch of Android games looks like on the big screen be sure check out the stream here.

Ready to Submit Your App or Game?

For more information about getting started with the Amazon Appstore, Amazon Fire devices, or how to submit your game check out the following additional resources:

AWS announced a great new service for developers today that allows you to stream your graphics and computationally-intensive apps in the cloud to a wide variety of devices, including tablets and mobile phones. Check out Jeff Barr’s post for all the details and we’ll provide more details on the benefits for mobile developers in an upcoming post.

This post discusses how Android apps can use Amazon Web Services (AWS) to send e-mail without additional infrastructure. The sample code presented here uses Amazon Simple Email Service to record feedback from users but this same method could be used in the following scenarios:

automated alerts/bug reports

feature requests

blog by e-mail

Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers. Amazon SES eliminates the complexity and expense of building an in-house e-mail solution or licensing, installing, and operating a third-party e-mail service.

This post shows a sample for the Android platform. The complete sample code and project files are included in the AWS SDK for Android. A link to the SDK is available at the end of this post.

To use the AWS SDK for Android, you will need AWS credentials, that is, an Access Key ID and Secret Access Key. If you haven't already signed up for Amazon Web Services, you will need to do that first to get your credentials. You can sign up for AWS here. After you sign up, you can retrieve your credentials at this page.

The sample application described here demonstrates how Android apps can record feedback from their users through Amazon SES. It requires that you already have a verified e-mail address; this address will be used as both the sender and recipient of the message, so it is not necessary to get production access to Amazon SES before using this sample application. You can verify an e-mail address on the AWS console and read more about verification and production access in the Amazon SES Getting Started Guide. Amazon SES can also be used to create other types of e-mails not shown here.

Creating an Amazon SES Client

Making requests to Amazon SES requires creating a client for the service. The code below shows how to create a client on both the iOS and Android platforms.

Creating E-mail

SES will accept both regular and raw e-mails. Our application makes use of the regular method, meaning we do not have to construct our own headers. Regular e-mails require a source, destination (list of to, cc, and bcc addresses) and a message, which itself comprises a body and subject. The code below shows how to create the various parts of the email on both the iOS and Android platforms.

Sending E-mail

Once we've constructed our e-mail components, it simply becomes a matter of creating a SendEmailRequest and passing this to the SES client we created earlier. The code below shows how to create a SendEmailRequest and send it with Amazon SES on both the iOS and Android platforms.

Amazon DynamoDB is a fast, highly scalable, highly available, cost-effective, non-relational database service. Amazon DynamoDB removes traditional scalability limitations on data storage while maintaining low latency and predictable performance. The sample mobile application described here demonstrates how to store user preferences in Amazon DynamoDB. Because more and more people are using multiple mobile devices, connecting these devices to the cloud, and storing user preferences in the cloud, enables developers to provide a more uniform cross-device experience for their users.

This article shows sample code for the Android platform. The complete sample code and project files are included in the AWS SDK for Android. Links to the SDK are available at the end of this article.

To use the sample app, you'll need to deploy a token vending machine (TVM). A TVM is a cloud-based application that manages AWS credentials for users of mobile applications. To deploy the TVM, you'll first need to obtain your own AWS credentials: an Access Key ID and Secret Key.

If you haven't already signed up for Amazon Web Services (AWS), you will need to do that first to get your AWS credentials. You can sign up for AWS here. After you sign up, you can retrieve your credentials at this page. The credentials will be used to set up the TVM to authenticate users of AWS mobile applications. Sample Java web applications are available here: Anonymous TVM and Identity TVM (this sample uses Anonymous TVM).

Overview

In Amazon DynamoDB, a database is a collection of tables. A table is a collection of items, and each item is a collection of attributes. For our app, we create a single table to store our list of users and their preferences. Each item in the table represents an individual user. Each item has multiple attributes, which include the user's name and their preferences. Each item also has a hash key—in this case, userNo—which is the primary key for the table.

The app demonstrates how to add and remove users, and modify and retrieve their preference data. The app also demonstrates how to create and delete Amazon DynamoDB tables.

Registering the Device with Token Vending Machine

In order to create an Amazon DynamoDB client, we must first register the mobile device with the token vending machine (TVM). For this sample, we use the Anonymous TVM to register the device. Then we store the UID and key returned by the TVM on the device.

Creating an Amazon DynamoDB Client

To make service requests to Amazon DynamoDB, you need to instantiate an Amazon DynamoDB client. The code below shows how to create an Amazon DynamoDB client for Android using the stored temporary credentials from the TVM.

Creating a User List (Table Creation)

Each user's preferences are stored as items in an Amazon DynamoDB table. The following code creates that table using the client we created above. Every Amazon DynamoDB table require a hash key. In this sample, we use userNo as the hash key for the table.

Checking the Status of the Table (Table Description)

Before we can move to the next step (creating users), we must wait until the status of the tables is ACTIVE. To retrieve the status of the table, we use a describe table request. This request returns information about the table such as the name of the table, item count, creation date and time, and its status.

Creating Users (Item Creation)

For each user, we'll create an item in the table. An item is a collection of attribute/value pairs. For each item, we'll have three attributes: userNo, firstName, and lastName. These are added to a put item request in order to create the item.

Listing Users (Table Scan)

We can retrieve a collection of users with a scan request. A scan request simply scans the table and returns the results in an undetermined order. Scan is an expensive operation and should be used with care to avoid disrupting your higher priority production traffic on the table. See the Amazon DynamoDB developer guide for more recommendations for safely using the Scan operation.

Overview

This article discusses how mobile apps can use Amazon Web Services to communicate with users via e-mail, short message service (SMS), and other communication channels. The sample code presented here uses Amazon Simple Notification Service and Amazon Simple Queue Service. Amazon Simple Notification Service (Amazon SNS) makes it easy to set up, manage, and send notifications from mobile apps and have these notifications delivered immediately to any users who have chosen to subscribe to them. Amazon SNS provides a highly scalable, flexible, and cost-effective method to implement such notification systems.

Together, Amazon SNS and Amazon SQS enable developers to create apps that can message large numbers of users in multiple formats quickly and easily.

The sample app described here demostrates how mobile apps can message their users through Amazon SNS and Amazon SQS. The sample demonstrates how to use Amazon SNS to create a topic, subscribe users to that topic, and publish notifications to the topic. Subscribers to the topic can receive their notifications via e-mail, SMS, or an Amazon SQS queue. Amazon SQS and Amazon SNS can also be used to create other types of communication systems not shown here.

This article shows sample code but the complete sample code and project files are included in the AWS SDK for Android. A link to the SDK is available at the end of this article.

To use the AWS SDK for Android, you will need AWS credentials, that is, an Access Key ID and Secret Access Key. If you haven't already signed up for Amazon Web Services (AWS), you will need to do that first to get your credentials. You can sign up for AWS here. After you sign up, you can retrieve your credentials at this page.

Creating Amazon SQS and Amazon SNS Clients

Making requests to Amazon SNS and Amazon SQS requires creating a client for each service. The code below shows how to create a client:

Topic Creation

Amazon SNS uses topics to route notifications from publishers to subscribers. The term publisher refers to an app that sends notifications; the term subscriber refers to an entity, such as a user, that receives notifications. Topics provide a junction point for publishers and subscribers to communicate with each other. Once a topic is created, subscribers can be added to the topic and receive notifications/messages. The DisplayName attribute is added to a topic to allow notifications to be sent via SMS.

Subscribing to Topics

In order for notifications sent to a topic to be received, you have to subscribe an endpoint to that topic. The endpoint corresponds to a recipient. An endpoint is an e-mail address, SMS number, web server, or Amazon SQS queue. If you are using an Amazon SQS queue, it needs to be configured to receive notification messages from Amazon SNS. Once you subscribe an endpoint to a topic and the subscription is confirmed, the endpoint will receive all messages published to that topic.

Listing a Topic's Subscribers

Listing the subscribers for a topic provides the endpoint and corresponding protocol for each subscriber who receives notification via that topic. The protocol for an endpoint depends on the type of endpoint. For example, endpoints that are e-mail addresses have a protocol of SMTP.

Adding a policy to a Queue

In order for a queue to receive messages from a topic, the queue must have a policy object that specifies that the topic has sqs:SendMessage permission for the queue. For further details see the Amazon SNS FAQ. For more information about queue policies see the Amazon SQS documentation. Once the policy object is created it can be attached to the queue as follows:

Receiving Messages from a Queue

Now that a message is in the queue, you can receive it, which requires getting it from the queue. When requesting to get a message from the queue, you can't specify which message to get. Instead, you simply specify the maximum number of messages you want to get (up to 10), and Amazon SQS returns up to that maximum number. Because Amazon SQS is a distributed system and the particular queue we're working with here has very few messages in it, the response to the receive request might be empty. Therefore, you should rerun the sample until you get the message. You should design your own app so that it continues to poll the queue until it gets one or more messages.

Delete Messages from a Queue

Amazon SQS doesn't automatically delete a message after returning it to the app. By default, it keeps the message to protect against the case where the receiving app fails or loses its connection. In these cases, a different app—or perhaps a new instance of the same app— might attempt to get the message.

To delete the message, you must send a separate request. You specify which message to delete by providing the receipt handle that Amazon SQS returned when you received the message. You can delete only one message per call. Deleting the message acknowledges that you've successfully received and processed it.

This article demonstrates how to use the AWS SDK for Android to uploadan image to Amazon Simple StorageService (S3) from your mobile device and how to make that imageavailable on the web. Amazon S3 is storage for the Internet. It's a simplestorage service that offers software developers a highly-scalable,reliable, secure, fast, and inexpensive data storage. The complete samplecode and project files are included in the AWS SDK for Android which canbe found here.

To use the AWS SDK for Android, you will need your AWS credentials,that is, your Access Key ID and Secret Access Key. If you haven'talready signed up for Amazon WebServices (AWS), you will need to do that first to get your AWScredentials. You can sign up for AWS here.

Here's what the sample app looks like at start up on Android:

Photo Upload

The app uses each platform's "image picker" utility to have theend-user select an image for upload. The app then creates an Amazon S3client, uses the client to create an Amazon S3 bucket in which to storethe image, and finally uploads the image into the bucket. A bucket is acontainer for objects stored in Amazon S3. Every object--such as animage--is contained within a bucket.

Get the image

The first step is to retrieve the content, in this case an image, tobe uploaded to Amazon S3. For this sample app, selecting an image from thedevice itself is an easy choice.

Browser Display

The app makes the image available for viewing in a browser bygenerating a pre-signed URL. A pre-signed URL is a URL for an Amazon S3resource that is signed with current AWS security credentials. Thepre-signed URL can then be shared with other users, allowing them toaccess resources without providing an account's AWS securitycredentials.

First, create an override content type to ensure thatthe "content" will be treated as an image by the browser.

Second, create the pre-signed URL request. Pre-signedURLs can be created with an expiration date, that is, a date andtime after which the resource will no longer be available. In the sample,the pre-signed URLs are valid for only one hour.

Next Steps

These few lines of code demonstrate how Amazon S3 could become alimitless storage device for your mobile photos. A photo sharing app thatallows users to view photos from other users would not be a difficultextension to the above code. Also, the content that is uploaded and sharedis not limited to images. The content could be audio files, video files,text, or other content that users want to store and share.

References

A sample app that includes this code is provided with both mobile SDKs.The download links can be found here: AWS SDK for Android.

For more information about using AWS credentials with mobileapplications see the following article: Authenticating Users of AWS Mobile Applications with a Token VendingMachine

Questions?

Please feel free to ask questions or make comments in the MobileDevelopment Forum.

Last month we announced a promotion with Amazon Web Services (AWS) where qualifying developers who submit an Android app or app update to the Amazon Appstore for Android are eligible to receive a $50 AWS credit to use toward the following services:

Remember, there’s still time to submit. The promotion runs through November 15, 2011, and we encourage you to get your apps in soon. We encourage you to ensure you’ve submitted the current versions of all your apps to the Amazon Appstore. Now is also a good time to verify that each app’s meta-data (including list price) is up-to-date. You can update your existing apps and submit new apps using the Amazon Appstore Developer Portal.

For developers new to AWS, here’s a great video on how to get started:

Many developers have already qualified for and received their promotion code for AWS. AWS combined with the Amazon Appstore provide a solid suite of solutions to build apps and a great place to get exposure. MightyMeeting, an app that enables users to run online meetings on the go from tablets, smartphones, or any web-enabled device is one great example. “We needed a cost-efficient robust infrastructure that could be used to manage presentations and online meetings in the cloud and scale up or down dynamically depending on the workload. We found that AWS addresses all our needs, even real-time media streaming during a meeting,” says Dmitri Tcherevik, CEO of MightyMeeting Inc.

Made by mobile developers for mobile developers, the AWS Mobile SDK for Android provides support for connecting your application to the cloud. These “connected” apps leverage AWS to manage and scale new and compelling features. The SDK makes it easy for you to build connected mobile applications by providing APIs that hide much of the lower-level networking code, including authentication, request retries, and error handling.

What types of connected features can you implement with the AWS Mobile SDK for Android?

Make your mobile game "social" by adding the ability to share moves, high scores, or player stats between devices using Amazon SimpleDB. Use the SDK to store and query data items via a simple interface, and Amazon SimpleDB does the rest.

And remember that camera-to-cloud application? Well, when your users ask you to update the application so they can email those photos and videos to friends, it’s going to be a snap, because you can use Amazon Simple Email Service to send emails from your application.

From September 7, 2011 through November 15, 2011, developers who submit an Android app to the Amazon Appstore are eligible to receive a one-time $50 promotion code for use on certain AWS services (subject to terms and conditions). Promotion codes will be emailed directly to developers during the first week of October and the last week of November.

AWS delivers a set of simple building block services that together form a reliable, scalable, and inexpensive computing platform “in the cloud”. With AWS, developers can easily access a scalable and cost-effective cloud computing resources through simple API calls or with the use of the AWS Mobile SDK for Android (and iOS). As noted in this blog post , some highlights of the AWS SDK for Android include:

Storage – developers can store and retrieve any amount of data using Amazon S3

Database – developers can add a highly available, scalable, and flexible non-relational data store using Amazon SimpleDB with little or no administrative burden