S3 Bucket

Use your existing S3 Bucket or dynamically create new one by following these guides:

Add dynamic S3 Bucket resource definition using AWS

To provision S3 dynamically, add it as a Dynamic Resource Definition. The bucket will be provisioned during the deployment time and destroyed when its introductory Environment is deleted.

Add an AWS account

  1. Click the Profile icon in the top right.
  2. Click Organization Settings.
  3. Click on Dynamic resources tab.
  4. Select Amazon Web Services.
    add_aws_account
  5. Humanitec will ask you to provide an account name (a memorable name that will be displayed for this account), an access key ID and a secret access key (see how to create AWS access key under IAM user).
  6. Once you have added your account you will see the available Dynamic Resource Definitions.
    added_aws_account

Add S3 Bucket Dynamic Resource Definition

  1. In Organization settings, Dynamic Resource tab, click on your AWS Account that you want to use for adding your S3 Bucket.
  2. Click on S3 Bucket resource definition.
  3. Add a memorable ID for this Resource Definition and select a driver, here - aws.
  4. Based on your resource driver, a form will be shown with the required driver parameters which will be passed to the driver on every resource creation. In this use case, region is a mandatory driver value and it must match the region that your AWS account has access to. Add the values and click create.
    add-s3-bucket-dynamic-resource
  5. Once created, the Resource Definition will appear in the list.
    dynamic-s3-bucket-added
  6. Assign your Resource Definition to an Environment Type.
    assign-env-type-to-dynamic-s3

Based on this Resource Definition, during the deployment on any of the matching environments, an Active Resource will be provisioned if required.

Add static S3 Bucket resource definition

Prerequisites

You need to be an owner of the S3 Bucket that you want to connect or be granted the permissions for this Bucket. Learn more.

Steps

  1. Log in to Humanitec.
  2. Click the Profile icon in the top right.
  3. Click Organization Settings.
  4. In Organization Settings page, click Static Resources.
  5. Click S3 Bucket, which opens a dialog to define your S3 Bucket as a static resource.
  6. Define an ID by which you will identify your resource definition
  7. Add S3 Bucket name and Region.
  8. Provide Access key ID and Secret access key to allow Humanitec access the Bucket (see how to create AWS access key under IAM user).
  9. Click Create and it will appear in the list.
  10. Assign your Static Resource Definition to an Environment Type.

static-s3-added

Based on this Static Resource Definition, during the deployment on any of the matching environments, the data required for the application to access the resource will be returned.