Amazon Developer Blogs

Amazon Developer Blogs

Showing posts tagged with AWS

April 16, 2019

Paul Cutsinger

We’re excited to announce the general availability of the AWS Certified Alexa Skill Builder – Specialty certification, the industry's first and only certification that validates your ability to build, test, and publish Amazon Alexa skills.

[Read More]

January 03, 2019

Paul Cutsinger

AWS Training and Certification is now offering a new AWS Certified Alexa Skill Builder – Specialty beta exam and four self-paced, digital training courses to help you enhance your voice design skills.

[Read More]

April 02, 2018

Akersh Srivastava

A recent webinar on Alexa for Business discussed how a voice-enabled interface can create new opportunities in a workplace, from building private Alexa skills to smart enabling conference rooms. This post outlines how you can build a private Alexa skill to enable voice-powered business analytics.

[Read More]

December 22, 2017

Basit Hussain

As customers give and receive new Alexa-enabled devices around the holidays, you may experience an increase in skill usage during the holidays. It’s important to scale your backend to prepare such traffic spikes.

[Read More]

September 07, 2017

Paul Cutsinger

Today AWS announced that developers can now export their Amazon Lex chatbot schema into an Alexa-compatible format for use in an Alexa skill.  This enables developers to offer users even more ways to interact with Amazon Lex powered conversational chatbots.

[Read More]

January 17, 2017

Bertrand Vacherot

With Amazon Alexa, developers are creating novel and delightful voice experiences for customers. University students are rethinking the way we live. Meet Adam Betemedhin, an Electrical Engineering major, and Kevin Duong-Tran, a Computer Science major, from the University of Nevada, Las Vegas (UNLV). Adam and Kevin, along with roughly 20 other students from multi-disciplinary backgrounds at UNLV, are participating in the 2017 Solar Decathlon, a competition sponsored by the U.S. Department of Energy that will culminate in October of this year. [Read More]

April 22, 2015

David Isbitski

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 Devices
Jesse 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 Fans
Peter 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, Amazon
Tara 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 Fun
Mike 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 Analytics
Nate 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: Loadout
3:30pm-4:15pm
Nate 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:15pm
Marcus Graham, Director of Community & Education at Twitch
Ernest 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:

-Dave (@TheDaveDev)

 

November 13, 2013

Mike Hines

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.

 

March 25, 2012

bkinney

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.

 

AWSCredentials credentials = new BasicAWSCredentials(                                           PropertyLoader.getInstance().getAccessKey(),                                           PropertyLoader.getInstance().getSecretKey() );AmazonSimpleEmailServiceClient sesClient =                              new AmazonSimpleEmailServiceClient( credentials );

 

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.

 

String subjectText = "Feedback from " + nameField.getText();Content subjectContent = new Content(subjectText);    	String bodyText = "Rating: " + ratingBar.getRating() + "\nComments\n" + commentsField.getText();Body messageBody = new Body(new Content(bodyText));	    	Message feedbackMessage = new Message(subjectContent,messageBody);    	String email = PropertyLoader.getInstance().getVerifiedEmail();Destination destination = new Destination().withToAddresses(email);

 

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.

 

SendEmailRequest request = new SendEmailRequest(email,destination,feedbackMessage);SendEmailResult result = clientManager.ses().sendEmail(request);

 

References

A sample application that includes this code is provided in the AWS SDK for Android. The download link can be found on the following pages:

For more information about using AWS credentials with mobile applications see the following article:

Questions?

Please feel free to ask questions or provide comments in the Mobile Development Forum.

January 26, 2012

Yosuke Matsuda

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.

RegisterDeviceRequest registerDeviceRequest = 
                                        new RegisterDeviceRequest(this.endpoint, this.useSSL, uid, key);ResponseHandler handler = new ResponseHandler();response = this.processRequest(registerDeviceRequest, handler);if (response.requestWasSuccessful()) {	AmazonSharedPreferencesWrapper.registerDeviceId(this.sharedPreferences, uid, key);}

Retrieving the Temporary Credentials from Token Vending Machine

The following code demonstrates how to request that the TVM generate temporary credentials, and how to store the returned credentials on the device.

Request getTokenRequest = new GetTokenRequest(this.endpoint, this.useSSL, uid, key);ResponseHandler handler = new GetTokenResponseHandler(key);GetTokenResponse getTokenResponse = 
                                (GetTokenResponse) this.processRequest(getTokenRequest, handler);if (getTokenResponse.requestWasSuccessful()) {	AmazonSharedPreferencesWrapper.storeCredentialsInSharedPreferences(			this.sharedPreferences, getTokenResponse.getAccessKey(),			getTokenResponse.getSecretKey(),			getTokenResponse.getSecurityToken(),			getTokenResponse.getExpirationDate());}

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.

AWSCredentials credentials = AmazonSharedPreferencesWrapper		.getCredentialsFromSharedPreferences(this.sharedPreferences);AmazonDynamoDBClient ddb = new AmazonDynamoDBClient(credentials);

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.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();KeySchemaElement kse = new KeySchemaElement()
                                                    .withAttributeName("userNo")
                                                    .withAttributeType(ScalarAttributeType.N);KeySchema ks = new KeySchema().withHashKeyElement(kse);ProvisionedThroughput pt = 
                new ProvisionedThroughput().withReadCapacityUnits(10l).withWriteCapacityUnits(5l);CreateTableRequest request = new CreateTableRequest()		                               .withTableName(PropertyLoader.getInstance().getTestTableName())                                               .withKeySchema(ks)
                                               .withProvisionedThroughput(pt);ddb.createTable(request);

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.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();DescribeTableRequest request = new DescribeTableRequest()		.withTableName(PropertyLoader.getInstance().getTestTableName());DescribeTableResult result = ddb.describeTable(request);String status = result.getTable().getTableStatus();

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.

HashMap<String, AttributeValue> item = new HashMap<String, AttributeValue>();AttributeValue userNo = new AttributeValue().withN(String.valueOf(i));item.put("userNo", userNo);AttributeValue firstName = new AttributeValue().withS(Constants.getRandomName());item.put("firstName", firstName);AttributeValue lastName = new AttributeValue().withS(Constants.getRandomName());item.put("lastName", lastName);PutItemRequest request = new PutItemRequest().withTableName(		PropertyLoader.getInstance().getTestTableName()).withItem(item);ddb.putItem(request);

Deleting Users (Item Deletion)

To remove a user from the list simply means deleting the corresponding item from the table. We specify the item we wish to delete using the hash key for the item.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();Key primaryKey = new Key().withHashKeyElement(targetValue);DeleteItemRequest request = new DeleteItemRequest().withTableName(		PropertyLoader.getInstance().getTestTableName()).withKey(primaryKey);ddb.deleteItem(request);

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.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();ScanRequest request = new ScanRequest();request.setTableName(PropertyLoader.getInstance().getTestTableName());ScanResult result = ddb.scan(request);ArrayList<HashMap<String, AttributeValue>> users = 
                      (ArrayList<HashMap<String, AttributeValue>>) result.getItems();

Retrieving a User's Preferences (Item Retrieval)

Knowing a user's userNo, the hash key of the table, it is easy to find the item for the user. This next snippet shows how to get all the attributes for an item using the hash key.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();AttributeValue userNoAttr = new AttributeValue().withN(String.valueOf(userNo));Key primaryKey = new Key().withHashKeyElement(userNoAttr);GetItemRequest request = new GetItemRequest().withTableName(		PropertyLoader.getInstance().getTestTableName()).withKey(primaryKey);GetItemResult result = ddb.getItem(request);HashMap<String, AttributeValue> userPreferences = 
                                        (HashMap<String, AttributeValue>) result.getItem();

Modifying User Preferences (Item Update)

The hash key also makes it easy to update an attribute for an item.

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();AttributeValue av = new AttributeValue().withS(value);AttributeValueUpdate avu = new AttributeValueUpdate().withValue(av).withAction(AttributeAction.PUT);Key primaryKey = new Key().withHashKeyElement(targetValue);HashMap<String, AttributeValueUpdate> updates = new HashMap<String, AttributeValueUpdate>();updates.put(key, avu);UpdateItemRequest request = new UpdateItemRequest()		.withTableName(PropertyLoader.getInstance().getTestTableName())		.withKey(primaryKey).withAttributeUpdates(updates);ddb.updateItem(request);

List Deletion (Table Deletion)

The easiest way to remove all the user preference data is to delete the Amazon DynamoDB table. The following code shows how:

AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();DeleteTableRequest request = new DeleteTableRequest()		.withTableName(PropertyLoader.getInstance().getTestTableName());ddb.deleteTable(request);

Conclusion and Additional Resources

The code in this article demonstrates how to use Amazon DynamoDB as a storage device for your mobile application. You can find more information about Amazon DynamoDB here.

Sample apps that include the code from this article are provided with the AWS SDK for Android. You can download the SDK using the following link:

AWS SDK for Android

For more information about using AWS credentials with mobile applications see the following article:

Authenticating Users of AWS Mobile Applications with a Token Vending Machine

Questions?

Please feel free to ask questions or provide comments in the Mobile Development Forum.