Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.

Page updated Mar 5, 2025

NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade.

Use existing AWS resources

These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.

If you are using the Amplify CLI, an existing Amazon S3 bucket can be used with the Amplify Libraries by running:

amplify import storage

For more details, see how to Use an existing S3 bucket or DynamoDB table.

If you are not using the Amplify CLI, an existing Amazon S3 bucket can be used by adding it to your Amplify.configure statement.

When you are not using Amplify CLI, adding existing Amazon S3 bucket to your application may require configuring bucket access permissions. e.g. Enabling read/write access to the Cognito user pool that you are using with the Amplify Auth category.

import { Amplify } from 'aws-amplify';
import { parseAmplifyConfig } from "aws-amplify/utils";
import resourceConfig from './amplifyconfiguration.json';
Amplify.configure({
...parseAmplifyConfig(resourceConfig),
Storage: {
S3: {
region: '[REGION]', // (required) - Amazon S3 bucket region
bucket: '[BUCKET NAME]' // (required) - Amazon S3 bucket URI
}
}
});
  • bucket: Name of the bucket to use for storage
  • region: AWS Region where the bucket is provisioned (e.g. us-east-1)

Note that before you can add an AWS resource to your application, the application must have the Amplify libraries installed. If you need to perform this step, see Install Amplify Libraries.

Configure S3 Object Lock

You can configure the S3 Object Lock parameter of the bucket using the isObjectLockEnabled configuration field. By default, isObjectLockEnabled is set to false. If you want to perform a put operation against a bucket with Object Lock enabled through the console you must first set isObjectLockEnabled to true.

Amplify.configure(existingConfig, {
Storage: {
S3: {
isObjectLockEnabled: true //OPTIONAl - Object Lock parameter
}
}
});