Category: AWS Elastic Beanstalk


AWS Elastic Beanstalk – Now Available in Singapore

AWS Elastic Beanstalk is now available in the Asia Pacific (Singapore) region. You can now use Elastic Beanstalk to deploy, manage, and scale Java, .NET, PHP, and Python applications in the following AWS regions:

  • US East (Northern Virginia)
  • US West (Northern California)
  • US West (Oregon)
  • Asia Pacific (Tokyo)
  • Asia Pacific (Singapore)
  • EU (Ireland)

After you upload your application to Elastic Beanstalk, it will manage all of the details for you. It will take care of capacity provisioning, load balancing, auto-scaling, and application health monitoring.

You can manage your Elastic Beanstalk applications in several different ways. You can use the AWS Management ConsoleGit deployment, and the eb command line interface, the AWS Toolkit for Visual Studio, or the AWS Toolkit for Eclipse.

Jeff;

PS – If you are interested in learning more about Elastic Beanstalk, plan on attending my online presentation at 1:00 PM (PT) on Monday, September 10th. This presentation is part of Bootstrap Week; you may also enjoy the other sessions.

Announcing AWS Elastic Beanstalk support for Python, and seamless database integration

Its a good day to be a Python developer: AWS Elastic Beanstalk now supports Python applications! If youre not familiar with Elastic Beanstalk, its the easiest way to deploy and manage scalable PHP, Java, .NET, and now Python applications on AWS. You simply upload your application, and Elastic Beanstalk automatically handles all of the details associated with deployment including provisioning of Amazon EC2 instances, load balancing, auto scaling, and application health monitoring.

Elastic Beanstalk supports Python applications that run on the familiar Apache HTTP server and WSGI. In other words, you can run any Python applications, including your Django applications, or your Flask applications. Elastic Beanstalk supports a rich set of tools to help you develop faster. You can use eb and Git to quickly develop and deploy from the command line. You can also use the AWS Management Console to manage your application and configuration.

The Python release brings with it many platform improvements to help you get your application up and running more quickly and securely. Here are a few of the highlights below:

Integration with Amazon RDS

Amazon RDS makes it easy to set up, operate, and scale a relational database in the cloud, making it a great fit for scalable web applications running on Elastic Beanstalk. 

If your application requires a relational database, Elastic Beanstalk can create an Amazon RDS database instance to use with your application. The RDS database instance is automatically configured to communicate with the Amazon EC2 instances running your application.

Console-rds
A console screenshot showing RDS configuration options when launching a new
AWS Elastic Beanstalk environment.

Once the RDS database instance is provisioned, you can retrieve information about the database from your application using environment variables:

import os

 

if ‘RDS_HOSTNAME’ in os.environ:

    DATABASES = {

        ‘default’: {

            ‘ENGINE’: ‘django.db.backends.mysql’,

            ‘NAME’: os.environ[‘RDS_DB_NAME’],

            ‘USER’: os.environ[‘RDS_USER’],

            ‘PASSWORD’: os.environ[‘RDS_PASSWORD’],

            ‘HOST’: os.environ[‘RDS_HOSTNAME’],

            ‘PORT’: os.environ[‘RDS_PORT’],

        }

}

To learn more about using Amazon RDS with Elastic Beanstalk, visit Using Amazon RDS with Python in the Developer Guide.

 

Customize your Python Environment

You can customize the Python runtime for Elastic Beanstalk using a set of declarative text files within your application. If your application contains a requirements.txt in its top level directory, Elastic Beanstalk will automatically install the dependencies using pip.

Elastic Beanstalk is also introducing a new configuration mechanism that allows you to install packages from yum, run setup scripts, and set environment variables. You simply create a .ebextensions directory inside your application and add a python.config file in it. Elastic Beanstalk loads this configuration file and installs the yum packages, runs any scripts, and then sets environment variables. Here is a sample configuration file that syncs the database for a Django application:

commands:

    syncdb:

        command: “django-admin.py syncdb –noinput”

        leader_only: true

 

option_settings:

    “aws:elasticbeanstalk:application:python:environment”:

        DJANGO_SETTINGS_MODULE: “mysite.settings”

    “aws:elasticbeanstalk:container:python”:

        WSGIPath: “mysite/wsgi.py”

 

Snapshot your logs

To help debug problems, you can easily take a snapshot of your logs from the AWS Management console. Elastic Beanstalk aggregates the top 100 lines from many different logs, including the Apache error log, to help you squash those bugs.

Console-snapshot-logs

The snapshot is saved to S3 and is automatically deleted after 15 minutes. Elastic Beanstalk can also automatically rotate the log files to Amazon S3 on an hourly basis so you can analyze traffic patterns and identify issues. To learn more, visit Working with Logs in the Developer Guide.

 

Support for Django and Flask

Using the customization mechanism above, you can easily deploy and run your Django and Flask applications on Elastic Beanstalk.

For more information about using Python and Elastic Beanstalk, visit the Developer Guide.

We look forward to hearing about how you put these new features to use!


AWS Elastic Beanstalk – Two Additional Regions Supported

We’ve brought AWS Elastic Beanstalk to both of the US West regions, bringing the total to five:

  • US East (Northern Virginia)
  • Asia Pacific (Tokyo)
  • EU (Ireland)
  • US West (Oregon)
  • US West (Northern California)

I have recently spent some time creating and uploading some PHP applications to Elastic Beanstalk using Git and the new ‘eb’ command. The process is very efficient and straightforward. I edit and test my code locally (which, for me, means an EC2 instance), commit it to my Git repository, and then push it (using the command git aws.push) to my Elastic Beanstalk environment. I can focus on my code while Elastic Beanstalk handles all of the deployment and management tasks including capacity provisioning, load balancing, auto-scaling, and health monitoring. I wrote an entire blog post on Git-based deployment to Elastic Beanstalk.

 

In addition to running PHP applications on Linux using the Apache HTTP server, Elastic Beanstalk also supports Java applications running on the Apache Tomcat stack on Linux and .NET applications running on IIS 7.5. Each environment is supported by the appropriate AWS SDK (PHP, Java, or .NET).

You can get started with Elastic Beanstalk at no charge by taking advantage of the AWS Free Usage Tier.

— Jeff;

 

AWS Elastic Beanstalk – Simplified Command Line Access with EB

I would like to welcome eb (pronounced ee-bee) to the family of Elastic Beanstalk command line tools! Eb simplifies the development and deployment tasks from the terminal on Linux, Mac OS, and Microsoft Windows. Getting started using Elastic Beanstalk from the command line is now as simple as:

  • eb init to set up credentials, choose the AWS Region, and the Elastic Beanstalk solution stack (operating system + application server + language environment).
  • eb start to create the Elastic Beanstalk application and launch an environment within it.
  • git aws.push to deploy code.

You can give eb a try by downloading the latest Elastic Beanstalk Command Line Tools. To learn more about eb, visit the AWS Elastic Beanstalk Developer Guide.

Here is how I use it to manage my Elastic Beanstalk applications…

Get Started
First, download the updated Elastic Beanstalk Command Line Tools and unzip it to a directory on disk. For quick access to the eb command, I recommend that you add this directory to your PATH. You are all set up and ready to go!

Create Your Application
In your applications directory, initialize your Git repository and run the following commands to create an Elastic Beanstalk application:

<devserver >: git init
Initialized empty Git repository in /Users /jeff /blog /.git

<devserver>: eb init
To get your AWS Access Key ID and Secret Access Key, visit “https://aws-portal.amazon.com/gp/aws/securityCredentials”.
Enter your AWS Access Key ID: AB…78
Enter your AWS Secret Access Key: abcd…1234
Select an AWS Elastic Beanstalk service region.
Available service regions are:
1) “US East (Virginia)”
2) “EU West (Ireland)”
3) “Asia Pacific (Tokyo)”
Select (1 to 3): 1
Enter an AWS Elastic Beanstalk application name (auto-generated value is “jeffblog”):
Enter an AWS Elastic Beanstalk environment name (auto-generated value is “jeffblog-env”):
Select a solution stack.
Available solution stacks are:
1) “32bit Amazon Linux running Tomcat 7”
2) “64bit Amazon Linux running Tomcat 7”
3) “32bit Amazon Linux running Tomcat 6”
4) “64bit Amazon Linux running Tomcat 6”
5) “32bit Amazon Linux running PHP 5.3”
6) “64bit Amazon Linux running PHP 5.3”
7) “64bit Windows Server 2008 R2 running IIS 7.5”
Select (1 to 7): 6
Successfully updated AWS Credential file at “C:\Users\jeff\.elasticbeanstalk\aws_credential_file”.

<devserver>: eb start
Now creating application “jeffblog”.
Waiting for environment “jeffblog-env” to launch.
2012-06-26 21:23:05     INFO    createEnvironment is starting.
2012-06-26 21:23:14     INFO    Using elasticbeanstalk-eu-west-1123456789012 as Amazon S3 storage bucket for environment data.
2012-06-26 21:23:15     INFO    Created Auto Scaling launch configuration named: awseb-jeffblog-env-65rxDnIDWV.
2012-06-26 21:23:16     INFO    Created load balancer named: awseb-jeffblog-env.
2012-06-26 21:23:16     INFO    Created Auto Scaling group named: awseb-jeffblog-env-Bub8kxJmPP.
2012-06-26 21:23:17     INFO    Created Auto Scaling trigger named: awseb-jeffblog-env-Bub8kxJmPP.
2012-06-26 21:23:19     INFO    Waiting for an EC2 instance to launch.
2012-06-26 21:24:05     INFO    Adding EC2 instances to the load balancer. This may take a few minutes.
2012-06-26 21:27:00     INFO    Application available at jeffblog-env-3tqewduwvb.elasticbeanstalk.com.
2012-06-26 21:27:04     INFO    Successfully launched environment: jeffblog-env
Application is available at “jeffblog-env-3tqewduwvb.elasticbeanstalk.com”.

In the example above, eb init walks you through a few questions and configures your settings so you can easily create and manage your application. It also configures your Git repository so you can directly push to Elastic Beanstalk. The command eb start creates the resources and launches a sample application on Elastic Beanstalk. The application is accessible at the URL shown above.

Deploy Your Code
To deploy your code to Elastic Beanstalk, you simply use git aws.push like this:

<devserver >: echo “<html><body><h1><?=’Hello eb!’?></h1></body></html>” > index.php

<devserver>: git add index.php

<devserver>:  git commit m v1
[master (root-commit) 23159c7] v1
 1 files changed, 1 insertions(+), 0 deletions()
 create mode 100644 index.php

<devserver>:  git aws.push
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 249 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
To https://abcd:1234@git.elasticbeanstalk.us-east-1.amazonaws.com/repos/6a656666626c6f67/jeffblog-env
 * [new branch]      HEAD –> master

To test your uploaded application, browse to the applications URL:

Update your Configuration Settings
Eb stores configuration settings in a file called .optionsettings inside the .elasticbeanstalk directory. To update your configuration settings, simply open the .optionsettings file, make a change, and then run eb update.

For example, to update my instance type from t1.micro to m1.small, I simply change the value of instancetype to m1.small and then run the following commands:

 

<devserver >: eb update
Updating environment “jeffblog-env”. This may take a few minutes.
2012-06- 26 21: 31: 41     INFO    Switched configuration attached to environment.
Environment “jeffblog-env” has been successfully updated.

Get Information about your Application
To get information about your Elastic Beanstalk application, you can use the eb status command:

<devserver >: eb status
URL     : jeffblog-env-3tqewduwvb.elasticbeanstalk.com
Status  : Ready
Health  : Green

Cleaning Up
Eb
provides 2 mechanisms to clean up: eb stop and eb delete.

The eb stop command deletes the AWS resources that are running your application (such as the ELB and the EC2 instances). It however leaves behind all of the application versions and configuration settings that you had deployed, so you can quickly get started again. Eb stop is ideal when you are developing and testing your application and dont need the AWS resources running over night. You can get going again by simply running eb start.

The eb delete command deletes the AWS resources as well as all application versions and configuration settings associated with your application. Eb delete is ideal when youre cleaning up a test application and want to start working on a new application from scratch.

<devserver >: eb stop
Are you sure? [y /n ]:y
Stopping environment “jeffblog-env”. This may take a few minutes.
$   2012-06- 26 21: 36: 48     INFO    terminateEnvironment is starting.
2012-06- 26 21: 36: 53     INFO    Deleted Auto Scaling trigger named: awseb-jeffblog-env-Bub8kxJmPP.
2012-06- 26 21: 36: 55     INFO    Set Auto Scaling group named: awseb-jeffblog-env-Bub8kxJmPP to zero ec2 instances.
2012-06- 26 21: 36: 58     INFO    Deleted load balancer named: awseb-jeffblog-env.
2012-06- 26 21: 37:02     INFO    Terminating Environment jeffblog-env.
2012-06- 26 21: 37:05     INFO    Waiting for Auto Scaling groups to terminate ec2 instances.
2012-06- 26 21: 38: 12     INFO    Waiting for Auto Scaling groups to terminate ec2 instances.
2012-06- 26 21: 39:04     INFO    Waiting for Auto Scaling groups to terminate ec2 instances.
2012-06- 26 21: 39:04     INFO    Auto Scaling groups terminated all ec2 instances
Environment “jeffblog-env” has been successfully stopped.

As you can see, eb gives you the power to set up, manage, and update your Elastic Beanstalk applications from the command line. Give it a try and let me know what you think.

Jeff;

AWS Elastic Beanstalk Now Available in Europe

Today we are expanding the availability of AWS Elastic Beanstalk to the EU (Ireland) region. This comes hot on the heels of our recent announcement of .NET support and our launch in Japan, and gives you the ability to choose any one of three regions for deployment (see the AWS Global Infrastructure map for more information).

With Elastic Beanstalk, you retain full control over the resources running your application and you can easily manage and adjust settings to meet your needs. Because Elastic Beanstalk leverages services like Amazon EC2 and Amazon S3, you can run your application on the same highly durable and highly available infrastructure.

Elastic Beanstalk automatically scales your application up and down based on default Auto Scaling settings. You can easily adjust Auto Scaling settings based on your specific application’s needs.

You have your choice of three separate development languages and tools when you use Elastic Beanstalk:

To get started with Elastic Beanstalk, visit the AWS Elastic Beanstalk Developer Guide.

I should mention that we are looking for highly motivated software developers and product managers who want to work on leading edge, highly scaled services such as AWS CloudFormation and AWS Elastic Beanstalk. If you are interested, send us your resume to aws-cloudformation-jobs at amazon.com or aws-elasticbeanstalk-jobs at amazon.com. Come and help us make history!

— Jeff;

PS – I recently interviewed Saad Ladki of the Elastic Beanstalk team on The AWS Report. You can watch the video to learn more about Elastic Beanstalk and how our customers are putting it to use.

Amazon RDS for SQL Server and .NET support for AWS Elastic Beanstalk

We are continuing to simplify the Windows development experience on AWS, and today we are excited to announce Amazon RDS for SQL Server and .NET support for AWS Elastic Beanstalk. Amazon RDS takes care of the tedious aspects of deploying, scaling, patching, and backing up of a relational database, freeing you from time-consuming database administration tasks. AWS Elastic Beanstalk is an easy way to deploy and manage applications in the AWS cloud and handles the deployment details of capacity provisioning, load balancing, auto scaling, and application health monitoring.

Here are the details…

Amazon RDS for SQL Server
We launched the Amazon Relational Database Service (RDS) in late 2009 with support for MySQL. Since then, we have added a number of features, including Multi-AZ, read replicas, and VPC support. Last year, we added support for Oracle Database.

Today we are extending the manageability benefits of Amazon RDS to SQL Server customers. Amazon RDS now supports Express, Web, Standard, and Enterprise Editions of SQL Server 2008 R2. We plan to add support for SQL Server 2012 later this year.

If you are a new Amazon RDS customer, you can use Amazon RDS for SQL Server (Express Edition) under the free usage tier for a full year. After that, you can use the service under multiple licensing models, with prices starting as low as $0.035/hour. Refer to Amazon RDS for SQL Server pricing for more details.

.NET Support for AWS Elastic Beanstalk
Earlier this year, we added support for PHP applications to Elastic Beanstalk alongside the existing support for Java applications.

Today, we are extending Elastic Beanstalk to our Windows developers who are building .NET applications. Elastic Beanstalk leverages the Windows Server 2008 R2 AMI and IIS 7.5 to run .NET applications. You can run existing applications on AWS with minimal changes. There is no additional charge for Elastic Beanstalkyou pay only for the AWS resources needed to store and run your applications. And if you are eligible for the AWS free usage tier, you can deploy and run your application on Elastic Beanstalk for free.

AWS Toolkit for Visual Studio Enhancements
We are also updating the AWS Toolkit for Visual Studio so you can deploy your existing web application projects to AWS Elastic Beanstalk. You can also use the AWS Toolkit for Visual Studio to create Amazon RDS DB Instances and connect to them directly, so you can focus on building your applications without leaving your development environment.

Lets look at how it all works. For a detailed step-by-step walkthrough, visit the AWS Elastic Beanstalk Developer Guide.

Deploy Your Application to AWS Elastic Beanstalk
To get started, simply install the AWS Toolkit for Visual Studio and make sure you have signed up for an AWS account. You can deploy any Visual Studio Web project to AWS Elastic Beanstalk, including ASP.NET MVC projects and ASP.NET Web Forms. As an example, I will use the NerdDinner MVC sample application.


(click for full-sized image)

To deploy to AWS Elastic Beanstalk, right-click the project, and then click Publish to AWS. Provide the details and complete the wizard. This will launch a new Elastic Beanstalk environment and create the AWS resources to run your application. Thats it; NerdDinner is now running on Elastic Beanstalk.

Create and Connect to an Amazon RDS Database Instance
By default, NerdDinner connects to a local SQL Server Express database, so well need to make a few changes to connect it to an Amazon RDS for SQL Server instance. Lets start by creating a new Amazon RDS for SQL Server instance using the AWS Explorer view inside Visual Studio.


(click for full-sized image)

We will also need to create the schema that NerdDinner expects. To do so, simply use the Publish to Provider wizard in Visual Studio to export the schema and data to a SQL script. You can then run the SQL script against the RDS for SQL Server database to recreate the schema and data.


(click for full-sized image)

Update Your Running Application
Now that the Amazon RDS for SQL Server database is set up, lets modify the applications connection string to use it. To do so, you simply modify the ConnectionString.config file in your NerdDinner project and provide the connection details of your RDS instance.


(click for full-sized image)

Finally, you will republish these changes to AWS Elastic Beanstalk. Using incremental deployments, the AWS Toolkit for Visual Studio will only upload the modified file and RDS-backed NerdDinner becomes available a few seconds later.


(click for full-sized image)

I hope that you enjoy these new AWS features!

— Jeff (with lots of help from Saad Ladki of the Elastic Beanstalk team);

AWS Elastic Beanstalk – Expanding to Japan

Saad from the Elastic Beanstalk team has some great news!

— Jeff;


Today we are expanding the availability of AWS Elastic Beanstalk to the Asia Pacific (Tokyo) region. Developers can now leverage the service in both the Asia Pacific (Tokyo) region and the US East (North Virginia) region.

To celebrate this new regional launch, I am going to highlight some of my favorite Elastic Beanstalk functionality and call out a few often-missed gems. If youre eager to just jump in, visit the Elastic Beanstalk Developer Guide.

Easy to Begin, Using the Interface That Fits Your Style
With a single click in the AWS Management Console, you can launch an Elastic Beanstalk environment, sit back, and let Elastic Beanstalk automatically handle provisioning, load balancing, auto scaling, and application health monitoring.

The AWS Toolkit for Eclipse provides deployment and management functionality for Java developers directly from the IDE. You can even start with a sample blogging application, the Travel Log, and customize it.

If you are working on your PHP application and prefer to use the command line, you can use the Git deployment and the command line interface.

You can also use one of the AWS SDK to programmatically update Elastic Beanstalk environments from your continuous build and deployment environment. Here is a list of the available region endpoints.

Impossible to Outgrow, Flexible, and Reliable
Elastic Beanstalk automatically scales your application up and down based on default Auto Scaling settings. You can easily adjust Auto Scaling settings based on your specific application’s needs.

With Elastic Beanstalk, you retain full control over the resources running your application and you can easily manage and adjust settings to meet your needs. Because Elastic Beanstalk leverages services like Amazon EC2 and Amazon S3, you can run your application on the same highly durable and highly available infrastructure.

Hidden Gems

Prepare for your launch When youre ready to launch your application, make sure that it is ready to handle production traffic and redundantly deployed across Availability Zones (AZ). Elastic Beanstalk makes the setup of a multiple AZ deployment as easy as changing a configuration setting.

No downtime deployment, no problem By allowing you to replicate environments and swap URL, Elastic Beanstalk provides an easy mechanism to reduce or eliminate downtime when deploying new application versions or configuration updates.

Lock it down with AWS Identity and Access Management (IAM) Elastic Beanstalk is integrated with IAM, allowing you to control the actions that each developer can make when youre developing, deploying, and testing across a team of developers.

No additional charge for Elastic Beanstalk You pay only for the AWS resources needed to store and run your applications.

To get started, visit the Elastic Beanstalk Developer Guide.

Saad Ladki, Product Manager for AWS Elastic Beanstalk

AWS Elastic Beanstalk – Build PHP Apps Using Git-Based Deployment

I’m pleased to be able to tell you that AWS Elastic Beanstalk now supports PHP and Git deployment.

Elastic Beanstalk and PHP
AWS Elastic Beanstalk makes it easy for you to quickly deploy and manage applications in the AWS cloud. You simply upload your application, and Elastic Beanstalk automatically handles all of the details associated with deployment including provisioning of EC2 instances, load balancing, auto scaling, and application health monitoring. Even though it does all of this for you, you retain full control over the AWS resources powering your application and you can access them at any time if necessary. There is no additional charge for Elastic Beanstalk – you pay only for the AWS resources needed to run your applications. AWS Elastic Beanstalk supports PHP applications that run on the familiar Apache HTTP server and PHP 5.3. AWS Elastic Beanstalk also supports Java web applications running on Apache Tomcat 6 and 7.

Under the hood, Elastic Beanstalk leverages AWS services such Amazon EC2, Elastic Load Balancing and Auto Scaling to provide a highly reliable, scalable and cost effective infrastructure for PHP applications. To get started, you can use the AWS Management Console or the Elastic Beanstalk command line tools to create applications and environments.

Git-Based Deployment
The newly released Git interface provides faster deployments based on the popular Git version control system. You can now set up your Git repositories to directly deploy changes to your AWS Elastic Beanstalk environments. Git speeds up deployments by only pushing your modified files to AWS Elastic Beanstalk. In seconds, PHP applications get updated on a set of Amazon EC2 instances. To learn more about how to leverage Git deployment, go to Deploying PHP Applications Using Git in the AWS Elastic Beanstalk Developer Guide.

<jeff wordpress>: git aws.push
Counting objects: 1035, done.
Delta compression using up to 2 threads.
Compressing objects: 100 % ( 1015 / 1015 ), done.
Writing objects: 100 % ( 1035 / 1035 ), 3.84 MiB | 229 KiB /s, done. | 229 KiB /s
Total 1035 (delta 72 ), reused 0 (delta 0 )
remote:
To https: //<url >.us-east- 1.amazonaws.com /repos /phptestapp /phptestenv
   683a95c..f8caebc  master – > master

If you make a change to a configuration file in your application, Git pushes the incremental changes to Elastic Beanstalk and your deployment completes in seconds:

<jeff wordpress>: git aws.push
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100 % ( 3 / 3 ), done.
Writing objects: 100 % ( 3 / 3 ), 287 bytes, done.
Total 3 (delta 2 ), reused 0 (delta 0 )
remote:
To https: //<url >.us-east- 1.amazonaws.com /repos /phptestapp /phptestenv
   c24a736..4df4dad  master – > master

And More
AWS Elastic Beanstalk allows you to directly modify both the infrastructure and software to match the requirements of your applications. You can connect your PHP applications to any database of your choice. If your application needs a MySQL database, Amazon RDS provides a highly available and scalable MySQL database and frees you from time-consuming database administration tasks. For a limited time, Amazon RDS is offering a 60-day free trial to new Amazon RDS customers. To learn more about your eligibility for the 60-day free trial and to sign up, visit aws.amazon.com/rds/free-trial. If youre looking for a database that offers fast and predictable performance with seamless scalability, use the AWS SDK for PHP to access the fully managed Amazon DynamoDB NoSQL database service.

As a PHP developer myself, I cant wait to start using the new PHP runtime and super fast Git deployment to manage my PHP applications on AWS. To learn more about AWS Elastic Beanstalk, go to the AWS Elastic Beanstalk Developer Guide.

— Jeff;

P.S: We are hiring software development engineers and product managers. If you are passionate about building the best developer experience, get in touch with us at aws-elasticbeanstalk-jobs@amazon.com.

 

Resource Level IAM for Elastic Beanstalk

Today’s guest post comes to you from Saad Ladki, Product Manager for AWS Elastic Beanstalk.

— Jeff;


We are excited to announce that AWS Elastic Beanstalk now supports resource permissions through AWS Identity and Access Management (IAM). AWS Elastic Beanstalk provides a quick way to deploy and manage applications in the AWS cloud. IAM enables you to manage permissions for multiple users within your AWS account.

In this blog post, we will walk you through an example of how you can leverage resource permissions for Elastic Beanstalk. Lets assume that a consulting firm is developing multiple applications for different customers and that Jack is one of the developers working on an Elastic Beanstalk application App1. Jill tests the changes for App1 and for a second application App2. John is the manager overseeing the two applications and owns the AWS resources. John helps out with development and testing, and only he can update their production environments for App1 and App2. The following matrix describes the different levels of access needed for Jack, Jill, and John:

    Jack Jill John
  Operation      
App1 View application, application versions, environments and configuration
Create application versions and deploy them to the staging environment  
Update the production environment    
Create and terminate environments    
App2 View application, application versions, environments and configuration  
Create application versions and deploy them to the staging environment    
Update the production environment    
Create and terminate environments    

To create the IAM users and assign policies, do the following:

  1. Log into the IAM tab of the AWS Management Console.
  2. In the Navigation pane, click Users.
  3. Click Create new Users. You can also create groups of users if you have multiple users with the same permissions.
  4. In the Create User page, type the name of the user(s) and click Create.
  5. In the Create User confirmation page, click Download Credentials to store the credentials for each user.
  6. In the user list, select the user John, and then click the Permissions tab.
  7. In the Permissions tab, click Attach User Policy.
  8. Click Custom Policy, and then click Select.
  9. In the Manage User Permissions page, type a name for each policy and then copy/paste the policies below. Notice that Jack has permissions to perform all Describe operations on application App1, and he can update only the app1-staging environment. This prevents him from being able to deploy to the production environment, app1-prod.

    Jack has three associated policies. Replace with your AWS account ID.

  10. Follow steps 7 through 10 to assign policies to John and Jill using policies modeled after the following:

If Jack attempts to deploy an application version to the app1-prod environment, he will receive the following error:

To learn more about AWS Elastic Beanstalk or to get started setting up resource permissions for AWS Elastic Beanstalk, go to the Creating Policies to Control Access to Specific AWS Elastic Beanstalk Resources in the AWS Elastic Beanstalk Developer Guide.

 — Saad

 

AWS Summer Startups: Mendeley

Although Summer is starting to ebb into Autumn in the northern hemisphere, it’s just getting going south of the equator, so there is still time to profile another start-up in our on-going series of profiles!

 

Mendeley team

Introducing Mendeley

Today I’m very happy to introduce you to Mendeley, a London based startup that harnesses cloud computing to help the academic community manage existing libraries of research, discover new research and collaborate with researchers around the world. They are simultaneously building the worlds largest crowd-sourced database of research covering all disciplines from Arts to Zoology. Mendeleys software also anonymously aggregates all usage data in the cloud and tracks what articles are being read, by whom, when and how often.

Like a lot of great ideas, the founders of Mendeley set out to solve their own problem, and came up with the concept for Mendeley while studying for higher degrees in business, psychology and machine learning. The team includes many people with backgrounds in software development, academia and publishing.

I spoke to Dan Harvey, a Data Mining Engineer at Mendeley about how they came to use AWS:

“We started out buying our own hardware 34 years ago. Initially our main reasons for using AWS were due to being able to scale up far more quickly and cheaply than we could ourselves for document storage. Over time this is still true with regard to cost and scaling, but the elastic properties of EC2 mean we only have to pay for resources when we are using them. More recently we’re finding that AWS gives our developers more flexibility to have the resources they need to test out new code and ideas, rather than stepping on one another’s toes on shared servers”

Mendeley are using a wide collection of AWS services to power their fast growing business, which now manages over 100 million papers.

“We wanted to produce previews of these documents for use on our article pages on the web. This was done using a combination of Elastic Beanstalk to host a Java app to render PDFs into raw images, S3 to store the data, CloudFront to serve the images to end users, and SQS to glue this all together”, said Dan.

 

Data driven

With such a rich collection of documents and data, Mendeley also provides tailored recommendations to its users, making use of Elastic MapReduce, and Mahout. Dan Harvey continues:

“Our latest use of AWS is with the Apache Mahout project. This is distributed collaborative filtering on top of the Hadoop framework; we use it to provide tailored recommendations for our users. We have our own Hadoop cluster internally but chose EMR for this because Mahout requires a different task granularity to our existing workload; we can optimise Hadoop on EMR for the specific recommendation task. It also allows us have a simple way of calculating the daily cost of recommendations based on the on-demand EC2 instances EMR uses with each run with a multi-use Hadoop cluster it is very hard to allocate costs between the different tasks that run on the shared infrastructure. Finally, when we’re done running recommendations, we can shut the cluster down and it costs us nothing.”

Introduction to AWS

Dan will join us to talk about Mendeley’s use of AWS in more detail at our upcoming Introduction to AWS event in London, where newcomers to the cloud can learn about how to build scalable, elastic applications on AWS. Attendance is free, but you’ll need to register.

 

More information

  • Mendeley have their own API, with which developers can build applications… for science! The Mendeley Binary Battle, an API competition judged by Amazon CTO Werner Vogels and others, runs until the end of September.
     
  • If you’re a start-up running on AWS, don’t forget that there is still time to enter this year’s AWS Start-up Challenge, a worldwide competition with prizes at all levels including $100,000 in cash and AWS credits for the grand prize winner. Learn more, and enter today.

 

~ Matt