Question: Iam new to AWS and Magento as well and iam trying to download Sample Magento data in my EC2 instance . I have installed magento in EC2 . When I tried using `bin/magento sampledata:deploy` in my EC2 , i got the error message as bin/magento not found. Can anybody tell what are the steps to download sample data in my ec2?

Answer: 
> 
> **create Model**
> 
> 
> 

**app/code/VendoreName/ModuleName/Model**

**CustomerAddress.php**

```
<?php

namespace VendoreName\ModuleName\Model;

use Magento\Framework\Model\AbstractModel;
use VendoreName\ModuleName\Model\ResourceModel\CustomerAddress as CustomerAddressResourceModel;

class CustomerAddress extends AbstractModel
{
    protected function _construct()
    {
        $this->_init(CustomerAddressResourceModel::class);
    }
}

```

**app/code/VendoreName/ModuleName/Model/ResourceModel**

**CustomerAddress.php**

```
<?php

namespace VendoreName\ModuleName\Model\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class CustomerAddress extends AbstractDb
{
    protected function _construct()
    {
        $this->_init('customer_address_entity', 'entity_id');
    }
}

```

**app/code/VendoreName/ModuleName/Model/ResourceModel/CustomerAddress**

**Collection.php**

```
<?php

namespace VendoreName\ModuleName\Model\ResourceModel\CustomerAddress;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
use VendoreName\ModuleName\Model\CustomerAddress as CustomerAddressModel;
use VendoreName\ModuleName\Model\ResourceModel\CustomerAddress as CustomerAddressResourceModel;

class Collection extends AbstractCollection
{
    protected function _construct()
    {
        $this->_init(
            CustomerAddressModel::class,
            CustomerAddressResourceModel::class
        );
    }
}

```

> 
> And get your customer multiple address 
> 
> 
> 

```
    protected $addressMapper;
    protected $CustomerAddress;

    public function __construct(
        ...........................................................
        \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
   \VendoreName\ModuleName\Model\ResourceModel\CustomerAddress\CollectionFactory $CustomerAddress,
        ...........................................................
    ) {
        ...........................................................
        $this->currentCustomer = $currentCustomer;
        $this->CustomerAddress = $CustomerAddress;    
        ...........................................................
    }

    public function getMultipleAddress()
    {
        $cust_id = $this->currentCustomer->getCustomerId();
        $data = $this->CustomerAddress->create();
        $data->addFieldToFilter('parent_id',$cust_id);
        return $data;
    }
}

```

and call in your phtml file 

```
echo "<pre>";
print_r($block->getMultipleAddress()->getData());
exit();

```

> 
> for print like default address please follow **magento root/vendor/magento/module-customer/view/frontend/templates/account/dashboard/address.phtml**
> 
> 
> 

***I Hope This Helps You.***
you can go into **Store >> Configuration >> Customers >> Customer Configuration >> Address Templates >> HTML**. 

It is formatted address template you can adjust like below:

```
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}T: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}
{{depend fax}}<br />F: {{var fax}}{{/depend}}
{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}

```

[![enter image description here](https://i.stack.imgur.com/4HCh9.png)](https://i.stack.imgur.com/4HCh9.png)
You should save the original formatted address just in case.
After adjusting it, just clear cache config.

Hope this will help you.