1 . Confused about hosting in amazon web services?
 

Answer :

It is very tough to predict the kind of back-end you would need without knowing the inside out of what you are building. Even after knowing all those, you will have to change things on the fly.

I would suggest you get started, then measure and improve on the fly. I can just give you some guiding points, though:

  1. Try this service called Elastic Beanstalk with m1.small instance to start with. This comes with an ELB and I would suggest use it.
  2. Store large files like video and sound on S3 (EBS is not for such needs)
  3. Database - If you have rich query needs, then use RDS (otherwise consider DynamoDB - Dynamo is easy to manage and it gives infinite scale).

Another good resource for you is the AWS reference architecture case studies: Architecture Center 


Leave a Comment

Name  
  Email   
Message
1 . Amazon Web Services Developer User Permissions?
 

Answer :

The Power User Access template in AWS Identity and Access Management (IAM) grants permission to do ANYTHING except using IAM. A user with this permission can view, create or remove any resources in your AWS account, but they could not create new users or modify any user permissions.

It is recommended that you only give people the least amount of privilege required to use AWS, so that they do not intentional nor accidentally do something unwanted. However, if you do not have enough knowledge of AWS to know what functionality is required, you will most likely need to trust the developer to configure the system for your needs.

A few tips:

  • Only give them access via an IAM User -- never give them your root credentials
  • If you don't know what permissions are required, then "Power User" is at least safer than "Administrator" since they cannot edit IAM settings
  • When they have completed their work, revoke their access so they cannot create any more AWS resources
  • Determine whether you also wish to revoke access to the EC2 instances (you'll have to do this on the instances themselves)
  • You may need to define some roles that will be used with Amazon EC2 -- these are defined in IAM, so the developer will not have permission to create the roles himself
  • Ask the developer for documentation of what he has deployed
  • Turn on Detailed Billing to identify what AWS charges you are receiving and check them against the documentation
  • Turn on CloudTrail to activate auditing of your account (it is activated per-region)

Alternatively, you could do all the AWS configuration (launching an EC2 instance, creating the database) and only let the developer login to the EC2 instance itself. That way, they would not need access to your AWS account.


2 . Amazon Web Service ItemSearch DetailPageURL's with Associate IDs?
 

Answer :

Simple error in the end..... I was including the tag in the initial search:

for searchResult in ecs.ItemSearch(item, SearchIndex=index, AssociateTag='wwwmydomain-12')

But not in the secondary loop that steps through each result getting more details:

for item in ecs.ItemSearch(searchResult.ASIN, ResponseGroup='Medium'):

should be:

for item in ecs.ItemSearch(searchResult.ASIN, ResponseGroup='Medium', AssociateTag='wwwodbodycom-21'):

The tag is needed in both - it seems it's not carried over.


3 . Unable to connect to Amazon web service mysql instance?
 

Answer :

Update: Firewalls are disabled on my end. It would be odd if amazon had firewalls on their end and wouldn't mention it in their documentation.

Amazon's security groups are a firewall.

I did set up the DB security group using the CIDR suggested by the console (I hope it give me the right value).

If it's not the IP you're connecting from, it's not the right value.


4 . Uploading Large HD Video Files to Amazon Web Services S3?

Answer :

You could implement the front-end in pretty much anything that you can code to speak native S3 multipart upload... which is the approach I'd recommend for this, because of stability.

With a multipart upload, "you" (meaning the developer, not the end user, I would suggest) choose a part size, minimum 5MB per part, and the file can be no larger that 10,000 "parts", each exactly the same size (the one "you" selected at the beginning of the upload, except for the last part, which would be however many bytes are left over at the end... so the ultimatel maximum size of the uploaded file depends on the part-size you choose.

The size of a "part" essentially becomes your restartable/retryable block size (win!)... so your front-end implementation can infinitely resend a failed part until it goes through correctly. Parts don't even have to be uploaded in order, they can be uploaded in parallel, and if you upload the same part more than once, the newer one replaces the older one, and with each block, S3 returns a checksum that you compare to your locally calculated one. The object doesn't become visible in S3 until you finalize the upload. When you finalize the upload, if S3 hasn't got all the parts (which is should, because they were all acknowledged when they uploaded) then the finalize call will fail.

The one thing you do have to keep in mind, though, is that multipart uploads apparently never time out, and if they are "never" either finalized/completed nor actively aborted by the client utility, you will pay for the storage of the uploaded blocks of the incomplete uploads. So, you want to implement an automated back-end process that periodically calls ListMultipartUploads to identify and abort those uploads that for whatever reason were never finished or canceled, and abort them.

I don't know how helpful this is as an answer to your overall question, but developing a custom front-end tool should not be a complicated matter -- the S3 API is very straightforward. I can say this, because I developed a utility to do this (for my internal use -- this isn't a product plug). I may one day release it as open source, but it likely wouldn't suit your needs anyway -- its essentially a command-line utility that can be used by automated/scheduled processes to stream ("pipe") the output of a program directly into S3 as a series of multipart parts (the files are large, so my default part-size is 64MB), and when the input stream is closed by the program generating the output, it detects this and finalizes the upload. :) I use it to stream live database backups, passed through a compression program, directly into S3 as they are generated, without ever needing those massive files to exist anywhere on any hard drive.

Your desire to have a smooth experience for your clients, in my opinion, highly commends S3 multipart for the role, and if you know how to code in anything that can generate a desktop or browser-based UI, can read local desktop filesystems, and has libraries for HTTP and SHA/HMAC, then you can write a client to do this that looks and feels exactly the way you need it to.

You wouldn't need to set up anything manually in AWS for each client, so long as you have a back-end system that authenticates the client utility to you, perhaps by a username and password sent over an SSL connection to an application on a web server, and then provides the client utility with automatically-generated temporary AWS credentials that the client utility can use to do the uploading.


5 . Is there a (C#) library that will create feeds for Amazon Marketplace Web Services?
 

Answer :

The .NET XML Schema Definition Tool can be used to generate classes from any XSD and can be used in conjunction with the XML Serializer to do what's described.

The Selling On Amazon Guide to XML (SOA-GuideToXML.pdf) does not contain references to the correct XSDs. The links are inconsistent with the XSDs that are reprinted in the document. My old link to correct XSDs is no longer valid. My best guess is that they can be found here (requires a Seller Central login).

This (very long) command will generate all the needed classes so far as I know. Note that you will need to make some minor changes in the generated file. I don't remember which way it worked, but I either needed to change certain 2-D arrays to 1-D arrays ([][] to []) or vice-versa. I remember the places where I had to make these changes being fairly obvious:

xsd xsd\amzn-base.xsd xsd\amzn-envelope.xsd xsd\amzn-header.xsd xsd\AttributeGroups.xsd xsd\AutoAccessory.xsd xsd\Beauty.xsd xsd\CameraPhoto.xsd xsd\CatPIL.xsd xsd\CE.xsd xsd\ClothingAccessories.xsd xsd\Customer.xsd xsd\CustomerAddress.xsd xsd\FoodAndBeverages.xsd xsd\FulfillmentCenter.xsd xsd\FulfillmentOrderCancellationRequest.xsd xsd\FulfillmentOrderRequest.xsd xsd\Gourmet.xsd xsd\Health.xsd xsd\Home.xsd xsd\HomeImprovement.xsd xsd\Image.xsd xsd\Inventory.xsd xsd\Item.xsd xsd\Jewelry.xsd xsd\Lighting.xsd xsd\Listings.xsd xsd\ListingSummary.xsd xsd\Loyalty.xsd xsd\MerchantListingsReport.xsd xsd\Miscellaneous.xsd xsd\MultiChannelOrderReport.xsd xsd\Music.xsd xsd\MusicalInstruments.xsd xsd\NavigationReport.xsd xsd\Offer.xsd xsd\Office.xsd xsd\OrderAcknowledgement.xsd xsd\OrderAdjustment.xsd xsd\OrderFulfillment.xsd xsd\OrderNotificationReport.xsd xsd\OrderReport.xsd xsd\Override.xsd xsd\PaymentMethod.xsd xsd\PetSupplies.xsd xsd\Price.xsd xsd\ProcessingReport.xsd xsd\Product.xsd xsd\ProductAttributes.xsd xsd\ProductClothing.xsd xsd\ProductImage.xsd xsd\Relationship.xsd xsd\ReverseFeed.xsd xsd\SettlementReport.xsd xsd\Sports.xsd xsd\Store.xsd xsd\SWVG.xsd xsd\TiresAndWheels.xsd xsd\Tools.xsd xsd\ToysBaby.xsd xsd\TypeDefinitions.xsd xsd\Video.xsd xsd\WebstoreItem.xsd xsd\Wireless.xsd  /c /n:WebLinc.Services.Amazon.Marketplace > output.txt 2>&1
pause


6 . Amazon Web Services (AWS) architecture [closed]?
 

Answer :

1 - hosting your sql db on RDS is fine, it is equally fine to host your database directly on your ec2 instance, perhaps even using the free version of sql server (sql express). For a low to medium low traffic site. For such a site it will work just fine and its not a bad way to start. If you don't want to manage the DB yourself, and you are OK with the extra cost, there is nothing wrong with going with RDS (probably technically a better solution); you also have the good option of starting with a local SQL Sever db on your ec2 instance an upgrade only if/when you need or want to.

2 You can't host your asp.net based website on S3, S3 could host a static website but asp.net is not an option; asp.net needs a back end server to serve it, so S3 would not be appropriate. You could however serve some of you assets from S3, i.e. images, css files and JavaScript files; you could also push those assets around the world using their CDN Cloudfront - that would be an appropriate and good use of S3 for an asp.net website.

3 If you are using asp.net, you pretty much are going to have to run your website on an ec2 instance if you plan on using aws...there isn't an alternative; they don't offer a shared hosting plan (ala discountasp.net).


7 . How to sign an Amazon web service request in .NET with SOAP and without WSE?
 

Answer :

UPDATE: new easier to use code that lets you still use the config settings for everything

In the previous code I posted, and what I've seen elsewhere, when the service object is created one of the constructor overrides is used to tell it to use HTTPS, give it the HTTPS url and to manually attach the message inspector that will do the signing. The downfall to not using the default constructor is you lose the ability to configure the service via the config file.

I've since redone this code so you can continue to use the default, parameterless, constructor and configure the service via the config file. The benifit of this is you don't have to recompile your code to use this, or make changes once deployed such as to maxStringContentLength (which is what caused this change to take place as well as discover the downfalls to doing it all in code). I also updated the signing part a bit so that way you can tell it what hashing algorithm to use as well as the regex for extracting the Action.

These two changes are because not all web services from Amazon use the same hashing algorithm and the Action might need to be extracted differently. This means you can reuse the same code for each service type just by changing what’s in the config file.

public class SigningExtension : BehaviorExtensionElement
{
    public override Type BehaviorType
    {
        get { return typeof(SigningBehavior); }
    }

    [ConfigurationProperty("actionPattern", IsRequired = true)]
    public string ActionPattern
    {
        get { return this["actionPattern"] as string; }
        set { this["actionPattern"] = value; }
    }

    [ConfigurationProperty("algorithm", IsRequired = true)]
    public string Algorithm
    {
        get { return this["algorithm"] as string; }
        set { this["algorithm"] = value; }
    }

    [ConfigurationProperty("algorithmKey", IsRequired = true)]
    public string AlgorithmKey
    {
        get { return this["algorithmKey"] as string; }
        set { this["algorithmKey"] = value; }
    }

    protected override object CreateBehavior()
    {
        var hmac = HMAC.Create(Algorithm);
        if (hmac == null)
        {
            throw new ArgumentException(string.Format("Algorithm of type ({0}) is not supported.", Algorithm));
        }

        if (string.IsNullOrEmpty(AlgorithmKey))
        {
            throw new ArgumentException("AlgorithmKey cannot be null or empty.");
        }

        hmac.Key = Encoding.UTF8.GetBytes(AlgorithmKey);

        return new SigningBehavior(hmac, ActionPattern);
    }
}

public class SigningBehavior : IEndpointBehavior
{
    private HMAC algorithm;

    private string actionPattern;

    public SigningBehavior(HMAC algorithm, string actionPattern)
    {
        this.algorithm = algorithm;
        this.actionPattern = actionPattern;
    }

    public void Validate(ServiceEndpoint endpoint)
    {
    }

    public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
    {
    }

    public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
    {
    }

    public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
    {
        clientRuntime.MessageInspectors.Add(new SigningMessageInspector(algorithm, actionPattern));
    }
}

public class SigningMessageInspector : IClientMessageInspector
{
    private readonly HMAC Signer;

    private readonly Regex ActionRegex;

    public SigningMessageInspector(HMAC algorithm, string actionPattern)
    {
        Signer = algorithm;
        ActionRegex = new Regex(actionPattern);
    }

    public void AfterReceiveReply(ref Message reply, object correlationState)
    {
    }

    public object BeforeSendRequest(ref Message request, IClientChannel channel)
    {
        var operation = GetOperation(request.Headers.Action);
        var timeStamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ");
        var toSignBytes = Encoding.UTF8.GetBytes(operation + timeStamp);
        var sigBytes = Signer.ComputeHash(toSignBytes);
        var signature = Convert.ToBase64String(sigBytes);

        request.Headers.Add(MessageHeader.CreateHeader("AWSAccessKeyId", Helpers.NameSpace, Helpers.AWSAccessKeyId));
        request.Headers.Add(MessageHeader.CreateHeader("Timestamp", Helpers.NameSpace, timeStamp));
        request.Headers.Add(MessageHeader.CreateHeader("Signature", Helpers.NameSpace, signature));

        return null;
    }

    private string GetOperation(string request)
    {
        var match = ActionRegex.Match(request);
        var val = match.Groups["action"];
        return val.Value;
    }
}

To use this you don't need to make any changes to your existing code, you can even put the signing code in a whole other assembly if need be. You just need to set up the config section as so (note: the version number is important, without it matching the code will not load or run)

<system.serviceModel>
  <extensions>
    <behaviorExtensions>
      <add name="signer" type="WebServices.Amazon.SigningExtension, AmazonExtensions, Version=1.3.11.7, Culture=neutral, PublicKeyToken=null" />
    </behaviorExtensions>
  </extensions>
  <behaviors>
    <endpointBehaviors>
      <behavior name="AWSECommerceBehaviors">
        <signer algorithm="HMACSHA256" algorithmKey="..." actionPattern="\w:\/\/.+/(?&lt;action&gt;.+)" />
      </behavior>
    </endpointBehaviors>
  </behaviors>
  <bindings>
    <basicHttpBinding>
      <binding name="AWSECommerceServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536">
        <readerQuotas maxDepth="32" maxStringContentLength="16384" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        <security mode="Transport">
          <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
        </security>
      </binding>
    </basicHttpBinding>
  </bindings>
  <client>
    <endpoint address="https://ecs.amazonaws.com/onca/soap?Service=AWSECommerceService" behaviorConfiguration="AWSECommerceBehaviors" binding="basicHttpBinding" bindingConfiguration="AWSECommerceServiceBinding" contract="WebServices.Amazon.AWSECommerceServicePortType" name="AWSECommerceServicePort" />
  </client>
</system.serviceModel>

8 . Amazon Web Services - What do i need?

Answer :

You want autoscaling both in the webtier and in database resources. You also likely want high availability (i.e. trans-AZ, trans-regional deployment). This answer might help point you in the right direction. Start with ElasticBeanstalk and RDS (if you can afford it). They both abstract out huge swathes of autoscaling.

Also pay close attention to the ElasticBeanstalk architectural overview. It'll help you distinguish between the web tier of your application, any application layers, and the database layer of your stack.


9 . CoAP (DTLS) connection to Amazon Web Services (AWS) for IoT?
 

Answer :

Unfortunately I can't tell anything about proxies (except that the approach seems somewhat clunky at first view).

But before that, can you afford DTLS on your mesh nodes? 
For example, you will need a good and fast random source. Every handshake will require to generate a 32-byte random "cookie".

Assume we use pre-shared keys and AES128 with CCM8 (since where could be no point to use something more simple): 
Every CoAP packet will be encrypted and extended to: 
DTLS header: 13 bytes 
Nonce: 16 bytes

Also you will need to store a few packets during a handshake (I can't tell the exact size but I suppose it is hundreds of bytes).

Anyway, it depends on that security level do you want to get.


10 . How to update prices of products with Amazon Marketplace Web Service (Amazon MWS) API?

Answer :

You need to send following Feed to amazon mws feed api, you send price feed of 15 different SKU in one request by looping through element for each SKU

$feed = <<< EOD
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>$merchant_token</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
  <MessageID>$i</MessageID>
  <Price>
    <SKU>$sku</SKU>
    <StandardPrice currency="$currency">$new_price</StandardPrice>
  </Price>
</Message>
</AmazonEnvelope>
EOD;

$feedHandle = @fopen('php://temp', 'rw+');
fwrite($feedHandle, $feed);
rewind($feedHandle);

$parameters = array(
    'Merchant' => $MERCHANT_ID,
    'MarketplaceIdList' => $marketplaceIdArray,
    'FeedType' => '_POST_PRODUCT_PRICING_DATA_',
    'FeedContent' => $feedHandle,
    'PurgeAndReplace' => false, //Leave this PurgeAndReplace to false so that it want replace whole product in amazon inventory
    'ContentMd5' => base64_encode(md5(stream_get_contents($feedHandle), true))
);

$request = new MarketplaceWebService_Model_SubmitFeedRequest($parameters);
$return_feed = invokeSubmitFeed($service, $request);
fclose($feedHandle);


11 . Could someone provide a C# example using itemsearch from Amazon Web Services?
 

Answer :

Here you go for what it's worth. This is code within an Asp.Net control to display book information. You can probably adapt it for your purposes easily enough. Or at least give you a starting-point. If you really want, I'd be happy to bundle the control up and send it your way.

if (!(string.IsNullOrEmpty(ISBN) && string.IsNullOrEmpty(ASIN)))
{
    AWSECommerceService service = new AWSECommerceService();
    ItemLookup lookup = new ItemLookup();
    ItemLookupRequest request = new ItemLookupRequest();

    lookup.AssociateTag = ConfigurationManager.AppSettings["AssociatesTag"];
    lookup.AWSAccessKeyId = ConfigurationManager.AppSettings["AWSAccessKey"];
    if (string.IsNullOrEmpty(ASIN))
    {
        request.IdType = ItemLookupRequestIdType.ISBN;
        request.ItemId = new string[] { ISBN.Replace("-", "") };
    }
    else
    {
        request.IdType = ItemLookupRequestIdType.ASIN;
        request.ItemId = new string[] { ASIN };
    }
    request.ResponseGroup = ConfigurationManager.AppSettings["AWSResponseGroups"].Split(new char[] { ' ', ',', ';' }, StringSplitOptions.RemoveEmptyEntries);

    lookup.Request = new ItemLookupRequest[] { request };
    ItemLookupResponse response = service.ItemLookup(lookup);

    if (response.Items.Length > 0 && response.Items[0].Item.Length > 0)
    {
        Item item = response.Items[0].Item[0];
        if (item.MediumImage == null)
        {
            bookImageHyperlink.Visible = false;
        }
        else
        {
            bookImageHyperlink.ImageUrl = item.MediumImage.URL;
        }
        bookImageHyperlink.NavigateUrl = item.DetailPageURL;
        bookTitleHyperlink.Text = item.ItemAttributes.Title;
        bookTitleHyperlink.NavigateUrl = item.DetailPageURL;
        if (item.OfferSummary.LowestNewPrice == null)
        {
            if (item.OfferSummary.LowestUsedPrice == null)
            {
                priceHyperlink.Visible = false;
            }
            else
            {
                priceHyperlink.Text = string.Format("Buy used {0}", item.OfferSummary.LowestUsedPrice.FormattedPrice);
                priceHyperlink.NavigateUrl = item.DetailPageURL;
            }
        }
        else
        {
            priceHyperlink.Text = string.Format("Buy new {0}", item.OfferSummary.LowestNewPrice.FormattedPrice);
            priceHyperlink.NavigateUrl = item.DetailPageURL;
        }
        if (item.ItemAttributes.Author != null)
        {
            authorLabel.Text = string.Format("By {0}", string.Join(", ", item.ItemAttributes.Author));
        }
        else
        {
            authorLabel.Text = string.Format("By {0}", string.Join(", ", item.ItemAttributes.Creator.Select(c => c.Value).ToArray()));
        }
        ItemLink link = item.ItemLinks.Where(i => i.Description.Contains("Wishlist")).FirstOrDefault();
        if (link == null)
        {
            wishListHyperlink.Visible = false;
        }
        else
        {
            wishListHyperlink.NavigateUrl = link.URL;
        }
    }
}

12 . Django on Amazon Web Service (AWS)?

Answer :

Although you seem to have solved your problem, I had a similar issue, but since my app was being uploaded from the root of the project directory, setting STATIC_ROOT = os.path.join(BASE_DIR, '..','static') didn't work.

Changing the container_commands to adhere to AWS Docs did the trick

container_commands:
  01_migrate:
    command: "django-admin.py migrate"
    leader_only: true
   02_collectstatic:
     command: "django-admin.py collectstatic --noinput"
     leader_only: true

Before that, following that same tutorial I've got the following issues

The createsu command wasn't working.

Running

$ eb ssh
$ /opt/python/run/venv/bin/python manage.py collectstatic

Somehow pointed to an odd location

You have requested to collect static files at the destination location as specified in your settings:/opt/python/bundle/2/app/static

All the above problems were also solved after changing the commands to the AWS Docs version.


13 . How to update prices of products with Amazon Marketplace Web Service (Amazon MWS) API?
 

Answer :

You need to send following Feed to amazon mws feed api, you send price feed of 15 different SKU in one request by looping through element for each SKU

$feed = <<< EOD
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>$merchant_token</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
  <MessageID>$i</MessageID>
  <Price>
    <SKU>$sku</SKU>
    <StandardPrice currency="$currency">$new_price</StandardPrice>
  </Price>
</Message>
</AmazonEnvelope>
EOD;

$feedHandle = @fopen('php://temp', 'rw+');
fwrite($feedHandle, $feed);
rewind($feedHandle);

$parameters = array(
    'Merchant' => $MERCHANT_ID,
    'MarketplaceIdList' => $marketplaceIdArray,
    'FeedType' => '_POST_PRODUCT_PRICING_DATA_',
    'FeedContent' => $feedHandle,
    'PurgeAndReplace' => false, //Leave this PurgeAndReplace to false so that it want replace whole product in amazon inventory
    'ContentMd5' => base64_encode(md5(stream_get_contents($feedHandle), true))
);

$request = new MarketplaceWebService_Model_SubmitFeedRequest($parameters);
$return_feed = invokeSubmitFeed($service, $request);
fclose($feedHandle);

14 . Is there any amazon web services (aws) simulation/emulation available?
 

Answer :

There are some pretty sophisticated Cloud service mocking frameworks out there, like kinesalite, dynalite, or moto.

You could also take a look at LocalStack, a framework which combines existing best-of-breed tools and provides a fully functional local cloud environment that can be used for integration testing. This allows you to test your applications offline, without connectivity and without paying for any of the cloud services.


15 . How can I migrate a Drupal site to Amazon Web Services EC2?
 

Answer :

You can use backup&migrate module for migration. It is very easy for using.

  1. Zip all files from your Drupal directory. Copy/unzip that file on new server.
  2. Backup your database in file with backup&migrate module.
  3. Install Drupal site on new server. Run install.php and follow steps - you should probably change settings in /sites/default/settings.php file.
  4. Go on /admin/modules and enable backup and migrate.
  5. Go on /admin/config/system/backup_migrate/restore upload your backup file and click restore button

NOTE 1 (database settings):

For Drupal installation of course you need to have database. You should just create empty DB and set up user for that database. You should also set up password for that DB user and give him full privileges. In settings.php file you then change that data:

if (!isset($databases)) {
  $databases = array();
}

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'nameofyourDB', //here you enter name of new empty database
  'username' => 'mylocalsiteDBusername', //here you enter user name of database user
  'password' => 'yourpassword',    //you should always set up password for database user for security reasons
  'host' => '127.0.0.1', //name of your host (usually is localhost)
  'port' => 33067 ); //default MySql port

Basically here you set up Drupal site on empty database you created on new server. After that you fill that database using backup and migrate module.