<commit_before>---
title: Deploying MicroBOSH to AWS
---

This topic describes how to deploy MicroBOSH to Amazon Web Services (AWS).

## <a id="create-manifest"></a>Step 1: Create a Deployment Manifest

The MicroBOSH deployment manifest is a YAML file that defines the components and properties of the deployment. Create a manifest for your deployment as follows:

1. Create a deployment directory to store your manifest.

    <pre class='terminal'>
    $ mkdir ~/micro-deployment
    </pre>

1. Create a deployment manifest YAML file.

    The example below is a MicroBOSH deployment manifest template. Copy and paste the template into a text editor and save the manifest to your deployment directory.

    In the template, you must replace the `ELASTIC-IP-ADDRESS`, `SUBNET-ID`, `AVAILABILITY-ZONE`, `ACCESS-KEY-ID`, and `SECRET-ACCESS-KEY` properties. We describe replacing these properties in [Step 2: Prepare an AWS Account](#prepare-aws).

  <p class="note"><strong>Note</strong>: The example below has the file name <code>manifest.yml</code>, which we reference in other examples in this topic.</p>

```yaml
---
name: microbosh

network:
  type: manual
  vip: ELASTIC-IP-ADDRESS # Replace with your Elastic IP address
  ip: 10.0.0.6
  dns: [10.0.0.2]
  cloud_properties:
    subnet: SUBNET-ID # Replace with your MicroBOSH Subnet ID

resources:
  persistent_disk: 20000
  cloud_properties:
    instance_type: m1.small
    availability_zone: AVAILABILITY-ZONE # Replace with your Availability Zone

cloud:
  plugin: aws
  properties:
    aws:
      access_key_id: ACCESS-KEY-ID # Replace with your AWSAccessKeyId
      secret_access_key: SECRET-ACCESS-KEY # Replace with your AWSSecretKey
      region: us-east-1
      default_key_name: bosh
      default_security_groups: ["bosh"]
      ec2_private_key: ./bosh.pem # Path relative to this manifest file

apply_spec:
  agent:
    blobstore: {address: 10.0.0.6}
    nats: {address: 10.0.0.6}
  properties:
    registry: {address: 10.0.0.6}
```

---
##<a id="prepare-aws"></a>Step 2: Prepare an AWS Account ##

To configure your AWS account for MicroBOSH:

* [Obtain AWS credentials](#credentials)
* [Create a Virtual Private Cloud (VPC)](#create-vpc)
* [Create an Elastic IP](#create-eip)
* [Create a Key Pair](#create-key-pair)
* [Create and Configure Security Group](#create-security)

### <a id="credentials"></a> Obtain AWS Credentials

Your AWS credentials consist of an Access Key ID and a Secret Access Key. If you already know your AWS credentials you can skip this step and replace `ACCESS-KEY-ID` and `SECRET-ACCESS-KEY` in your deployment manifest.

1. Log into the AWS console: [https://console.aws.amazon.com/console/home](https://console.aws.amazon.com/console/home).

    <%= image_tag("images/deploy-microbosh-to-aws/account-dashboard.png") %>

1. Click your account name and select **Security Credentials**.

    <%= image_tag("images/deploy-microbosh-to-aws/security-credentials-menu.png") %>

1. If the AWS IAM confirmation box appears, click **Continue to Security Credentials** to display the Security Credentials page.

1. Expand the **Access Keys** section and click **Create New Access Key**.<commit_msg>change bulleted list to numbered in  deploy_microbosh_to_aws.html<commit_after>---
title: Deploying MicroBOSH to AWS
---

This topic describes how to deploy MicroBOSH to Amazon Web Services (AWS).

## <a id="create-manifest"></a>Step 1: Create a Deployment Manifest

The MicroBOSH deployment manifest is a YAML file that defines the components and properties of the deployment. Create a manifest for your deployment as follows:

1. Create a deployment directory to store your manifest.

    <pre class='terminal'>
    $ mkdir ~/micro-deployment
    </pre>

1. Create a deployment manifest YAML file.

    The example below is a MicroBOSH deployment manifest template. Copy and paste the template into a text editor and save the manifest to your deployment directory.

    In the template, you must replace the `ELASTIC-IP-ADDRESS`, `SUBNET-ID`, `AVAILABILITY-ZONE`, `ACCESS-KEY-ID`, and `SECRET-ACCESS-KEY` properties. We describe replacing these properties in [Step 2: Prepare an AWS Account](#prepare-aws).

  <p class="note"><strong>Note</strong>: The example below has the file name <code>manifest.yml</code>, which we reference in other examples in this topic.</p>

```yaml
---
name: microbosh

network:
  type: manual
  vip: ELASTIC-IP-ADDRESS # Replace with your Elastic IP address
  ip: 10.0.0.6
  dns: [10.0.0.2]
  cloud_properties:
    subnet: SUBNET-ID # Replace with your MicroBOSH Subnet ID

resources:
  persistent_disk: 20000
  cloud_properties:
    instance_type: m1.small
    availability_zone: AVAILABILITY-ZONE # Replace with your Availability Zone

cloud:
  plugin: aws
  properties:
    aws:
      access_key_id: ACCESS-KEY-ID # Replace with your AWSAccessKeyId
      secret_access_key: SECRET-ACCESS-KEY # Replace with your AWSSecretKey
      region: us-east-1
      default_key_name: bosh
      default_security_groups: ["bosh"]
      ec2_private_key: ./bosh.pem # Path relative to this manifest file

apply_spec:
  agent:
    blobstore: {address: 10.0.0.6}
    nats: {address: 10.0.0.6}
  properties:
    registry: {address: 10.0.0.6}
```

---
##<a id="prepare-aws"></a>Step 2: Prepare an AWS Account ##

To configure your AWS account for MicroBOSH:

1. [Obtain AWS credentials](#credentials)
1. [Create a Virtual Private Cloud (VPC)](#create-vpc)
1. [Create an Elastic IP](#create-eip)
1. [Create a Key Pair](#create-key-pair)
1. [Create and Configure Security Group](#create-security)

### <a id="credentials"></a> Obtain AWS Credentials

Your AWS credentials consist of an Access Key ID and a Secret Access Key. If you already know your AWS credentials you can skip this step and replace `ACCESS-KEY-ID` and `SECRET-ACCESS-KEY` in your deployment manifest.

1. Log into the AWS console: [https://console.aws.amazon.com/console/home](https://console.aws.amazon.com/console/home).

    <%= image_tag("images/deploy-microbosh-to-aws/account-dashboard.png") %>

1. Click your account name and select **Security Credentials**.

    <%= image_tag("images/deploy-microbosh-to-aws/security-credentials-menu.png") %>

1. If the AWS IAM confirmation box appears, click **Continue to Security Credentials** to display the Security Credentials page.

1. Expand the **Access Keys** section and click **Create New Access Key**.
{'fraction_non_alphanumeric': 0.10664798380818932, 'fraction_numerical': 0.01385645337069905, 'mean_word_length': 4.0109204368174725, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2252352', 'n_tokens_mistral': 2052, 'n_tokens_neox': 1931, 'n_words': 710}