1. Create an Amazon Web Services Account
To use Amazon S3, you first need an AWS account. Go to the official AWS website and complete the registration process. During registration, AWS may ask for account, contact, payment and verification information. Once registration is completed, log in to the AWS Management Console. The AWS account acts as the main environment in which you can create and manage services such as S3 and IAM.
2. Create an IAM User
After logging into AWS, navigate to: AWS Console → IAM → Users → Create user. An IAM user is created specifically to allow Odoo to communicate with AWS without using the main AWS account credentials. The IAM user should have only the permissions required for the S3 operations performed by Odoo.
Depending on the functionality required by the connector, permissions may include operations such as:
- Listing S3 buckets
- Listing objects
- Uploading objects
- Downloading objects
- Deleting objects
- Reading bucket information
For better security, it is recommended to follow the principle of least privilege and grant access only to the required S3 bucket rather than granting unrestricted access to all AWS resources.
3. Generate the Access Key and Secret Access Key
After creating the IAM user, open the user and navigate to: IAM User → Security Credentials → Access Keys. Create a new access key. AWS provides two important credentials:
Access Key ID
The Access Key ID identifies the IAM user when Odoo sends requests to AWS. It looks similar to: AKIAxxxxxxxxxxxxxxxx
Secret Access Key
The Secret Access Key is used together with the Access Key ID to authenticate requests. It looks similar to: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The Secret Access Key is sensitive information. It should not be shared publicly, committed to Git, included in screenshots, or stored directly in publicly accessible files.
4. Create an S3 Bucket
Next, navigate to: AWS Console → S3 → Buckets → Create bucket. An S3 bucket is the storage container where files and objects are stored. Enter a unique bucket name, for example: my-odoo-production-storage. S3 bucket names must follow AWS naming rules and must be unique within the relevant AWS namespace.
During bucket creation, AWS provides several configuration options, including:
- AWS Region
- Object Ownership
- Block Public Access
- Bucket Versioning
- Encryption
- Other bucket-level settings
For an Odoo document-storage integration, it is generally preferable to keep the bucket private and use IAM permissions rather than making the bucket publicly accessible.
5. Understand the Relationship Between IAM and S3
The different AWS components have different responsibilities:
AWS Account
│
├── IAM User
│ ├── Access Key ID
│ └── Secret Access Key
└── S3
└── Bucket
└── Odoo Files
The IAM user provides the identity that Odoo uses to authenticate with AWS. The access keys allow Odoo to authenticate as that IAM user. The IAM permissions determine what that user is allowed to do. The S3 bucket is the actual storage location.
6. Configure the Amazon S3 Connector in Odoo
Once AWS configuration is completed, the credentials and bucket information can be entered into the Amazon S3 Connector configuration in Odoo. Typically, the configuration requires information such as:
- Access Key ID: AKIAxxxxxxxxxxxxxxxx
- Secret Access Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Bucket Name: my-odoo-production-storage
7. IAM Permissions Are Important
Having an Access Key ID and Secret Access Key does not automatically mean that Odoo can access every S3 bucket. The IAM user must have appropriate permissions. For example, if Odoo needs to upload files, the IAM user needs permission to perform the relevant S3 upload operation.
8. How It Works
When a file is uploaded through Odoo, the Amazon S3 Connector automatically sends and stores the file in the configured S3 bucket. The file is therefore stored in Amazon S3 instead of being stored only on the Odoo server.
Conclusion
The Amazon S3 Connector setup consists of two main parts: AWS configuration and Odoo configuration. On the AWS side, an S3 bucket is created to act as the storage location, while an IAM user is created to provide Odoo with controlled access to that bucket. The Access Key ID identifies the IAM user and the Secret Access Key authenticates the user. IAM permissions then determine which S3 operations Odoo is allowed to perform. After obtaining the credentials and creating the bucket, the Access Key ID, Secret Access Key, bucket name and region are configured in Odoo. Once the connection is successfully tested, Odoo can communicate with Amazon S3 and use the configured bucket for its file-storage operations.