AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

Provide storage methods to use AWS S3

### Hierarchy

- AWSS3Provider

### Implements

- any

## Index

### Constructors

- constructor

### Properties

- CATEGORY
- PROVIDER_NAME

### Methods

- _ensureCredentials
- configure
- get
- getCategory
- getProviderName
- list
- put
- remove

## Constructors

### constructor

- new AWSS3Provider(config?: StorageOptions): AWSS3Provider

- - Defined in storage/src/Providers/AWSS3Provider.ts:53

  Initialize Storage with AWS configurations

  #### Parameters

  - ##### Optional config: StorageOptions

    Configuration object for storage

  #### Returns AWSS3Provider

## Properties

### Static CATEGORY

CATEGORY: string = "Storage"

- Defined in storage/src/Providers/AWSS3Provider.ts:47

### Static PROVIDER_NAME

PROVIDER_NAME: string = "AWSS3"

- Defined in storage/src/Providers/AWSS3Provider.ts:48

## Methods

### Private _ensureCredentials

- _ensureCredentials(): any

- - Defined in storage/src/Providers/AWSS3Provider.ts:362

  #### Returns any

### configure

- configure(config?: any): object

- - Defined in storage/src/Providers/AWSS3Provider.ts:83

  Configure Storage part with aws configuration

  #### Parameters

  - ##### Optional config: any

    Configuration of the Storage

  #### Returns object

  - Current configuration

### get

- get(key: string, config?: any): Promise<String | Object>

- - Defined in storage/src/Providers/AWSS3Provider.ts:99

  Get a presigned URL of the file or the object data when download:true

  #### Parameters

  - ##### key: string

    key of the object

  - ##### Optional config: any

  #### Returns Promise<String | Object>

  - A promise resolves to Amazon S3 presigned URL on success

### getCategory

- getCategory(): string

- - Defined in storage/src/Providers/AWSS3Provider.ts:67

  get the category of the plugin

  #### Returns string

### getProviderName

- getProviderName(): string

- - Defined in storage/src/Providers/AWSS3Provider.ts:74

  get provider name of the plugin

  #### Returns string

### list

- list(path: any, config?: any): Promise<any>

- - Defined in storage/src/Providers/AWSS3Provider.ts:307

  List bucket objects relative to the level and prefix specified

  #### Parameters

  - ##### path: any

    the path that contains objects

  - ##### Optional config: any

  #### Returns Promise<any>

  - Promise resolves to list of keys for all objects in path

### put

- put(key: string, object: any, config?: any): Promise<Object>

- - Defined in storage/src/Providers/AWSS3Provider.ts:179

  Put a file in S3 bucket specified to configure method

  #### Parameters

  - ##### key: string

    key of the object

  - ##### object: any

    File to be put in Amazon S3 bucket

  - ##### Optional config: any

  #### Returns Promise<Object>

  - promise resolves to object on success

### remove

- remove(key: string, config?: any): Promise<any>

- - Defined in storage/src/Providers/AWSS3Provider.ts:259

  Remove the object for specified key

  #### Parameters

  - ##### key: string

    key of the object

  - ##### Optional config: any

  #### Returns Promise<any>

  - Promise resolves upon successful removal of the object