Working with custom engine versions for Amazon RDS Custom for Oracle - Amazon Relational Database Service

Working with custom engine versions for Amazon RDS Custom for Oracle

A custom engine version (CEV) for Amazon RDS Custom for Oracle is a binary volume snapshot of a database engine and specific Amazon Machine Image (AMI). You store your database installation files in Amazon S3. RDS Custom uses the installation files to create your CEV for you.

Preparing to create a CEV

To create a CEV, access the installation files and patches for Oracle Database 19c Enterprise Edition that are stored in your Amazon S3 bucket. For example, you can use the April 2021 RU/RUR, or any valid combination of installation files and patches.

Downloading your database installation files and patches from Oracle

The Oracle Database installation files and patches are hosted on Oracle Software Delivery Cloud.

To download the database installation files

  1. Go to https://edelivery.oracle.com/ and sign in.

  2. In the box, enter Oracle Database Enterprise Edition and choose Search.

  3. Select DLP: Oracle Database Enterprise Edition 19.3.0.0.0 ( Oracle Database Enterprise Edition ).

  4. Choose Continue.

  5. Clear Download Queue.

  6. Choose Oracle Database 19.3.0.0.0 - Long Term Release.

  7. Choose Linux x86-64 in Platform/Languages.

  8. Choose Continue, and then sign the waiver.

  9. Choose V982063-01.zip, and then save the file.

    Note

    The SHA-256 hash is BA8329C757133DA313ED3B6D7F86C5AC42CD9970A28BF2E6233F3235233AA8D8.

  10. Click the links in the following table to download the Oracle patches. All URLs are for updates.oracle.com or support.oracle.com.

    File Description
    p6880880_190000_Linux-x86-64.zip OPatch for this version of Oracle
    p32126828_190000_Linux-x86-64.zip Patch 32126828 - COMBO OF OJVM RU COMPONENT 19.10.0.0.210119 + DB RU 19.10.0.0.210119
    p29213893_1910000DBRU_Generic.zip Patch 29213893: DBMS_STATS FAILING WITH ERROR ORA-01422 WHEN GATHERING STATS FOR USER TABLE
    p29782284_1910000DBRU_Generic.zip Patch 29782284: ORA-06508: "MDSYS.MDPRVT_IDX" WHILE UPGRADING DATABASE TO 18.3
    p28730253_190000_Linux-x86-64.zip Patch 28730253: SUPPORT NEW ERA REIWA FOR JAPANESE IMPERIAL CALENDAR
    p29374604_1910000DBRU_Linux-x86-64.zip Patch 29374604: Golden Gate Integrated Extract not starting 18c/19c Standard Edition
    p28852325_190000_Linux-x86-64.zip DST files - RDBMS - DSTV33 UPDATE - TZDATA2018G - Patch 28852325
    p29997937_190000_Linux-x86-64.zip DST files - RDBMS - DSTV34 UPDATE - TZDATA2019B - Patch 29997937
    p31335037_190000_Linux-x86-64.zip DST files - RDBMS - DSTV35 UPDATE - TZDATA2020A - Patch 31335037
    p31335142_190000_Generic.zip DST files - DSTV35 UPDATE - TZDATA2020A - NEED OJVM FIX - Patch 31335142

Uploading your installation files to Amazon S3

Upload your Oracle installation and patch files to Amazon S3 using the AWS CLI. The S3 bucket that contains your installation files must be in the same AWS Region as your CEV.

Choose either of the following options:

  • Use aws s3 cp to upload a single .zip file.

    Upload each installation .zip file separately. Don't combine the .zip files into a single .zip file.

  • Use aws s3 sync to upload a directory.

List your installation files using either the AWS Management Console or the AWS CLI.

Examples in this section use the following placeholders:

  • install-or-patch-file.zip – Oracle installation media file. For example, p32126828_190000_Linux-x86-64.zip is a patch.

  • my-custom-installation-files – Your Amazon S3 bucket designated for your uploaded installation files.

  • 123456789012/cev1 – An optional prefix in your Amazon S3 bucket.

  • source-bucket – An Amazon S3 bucket where you can optionally stage files.

The following example uploads install-or-patch-file.zip to the 123456789012/cev1 folder in the RDS Custom Amazon S3 bucket. Run a separate aws s3 command for each .zip that you want to upload.

For Linux, macOS, or Unix:

aws s3 cp install-or-patch-file.zip \ s3://my-custom-installation-files/123456789012/cev1/

For Windows:

aws s3 cp install-or-patch-file.zip ^ s3://my-custom-installation-files/123456789012/cev1/

Verify that your S3 bucket is in the AWS Region where you plan to run the create-custom-db-engine-version command.

aws s3 get-bucket-location --bucket my-custom-installation-files

List the files in your RDS Custom Amazon S3 bucket as follows.

aws s3 ls \ s3://my-custom-installation-files/123456789012/cev1/

The following example uploads the files in your local cev1 folder to the 123456789012/cev1 folder in your Amazon S3 bucket.

For Linux, macOS, or Unix:

aws s3 sync cev1 \ s3://my-custom-installation-files/123456789012/cev1/

For Windows:

aws s3 sync cev1 ^ s3://my-custom-installation-files/123456789012/cev1/

The following example uploads all files in source-bucket to the 123456789012/cev1 folder in your Amazon S3 bucket.

For Linux, macOS, or Unix:

aws s3 sync s3://source-bucket/ \ s3://my-custom-installation-files/123456789012/cev1/

For Windows:

aws s3 sync s3://source-bucket/ ^ s3://my-custom-installation-files/123456789012/cev1/

Creating the CEV manifest

A CEV manifest is a JSON document that describes installation .zip files stored in Amazon S3.

Either save the CEV manifest as a file, or edit the template when creating the CEV using the console.

The following CEV manifest lists the files that you uploaded to Amazon S3. RDS Custom applies the patches in the order in which they are listed. In the following example, RDS Custom applies p32126828, then p29213893, then p29782284, and so on.

{ "mediaImportTemplateVersion": "2020-08-14", "databaseInstallationFileNames": [ "V982063-01.zip" ], "opatchFileNames": [ "p6880880_190000_Linux-x86-64.zip" ], "psuRuPatchFileNames": [ "p32126828_190000_Linux-x86-64.zip" ], "otherPatchFileNames": [ "p29213893_1910000DBRU_Generic.zip", "p29782284_1910000DBRU_Generic.zip", "p28730253_190000_Linux-x86-64.zip", "p29374604_1910000DBRU_Linux-x86-64.zip", "p28852325_190000_Linux-x86-64.zip", "p29997937_190000_Linux-x86-64.zip", "p31335037_190000_Linux-x86-64.zip", "p31335142_190000_Generic.zip" ] }

The following table describes the JSON fields.

JSON field Description Valid values
MediaImportTemplateVersion

Version of the CEV manifest. The date is in the format YYYY-MM-DD.

2020-08-14

databaseInstallationFileNames

Ordered list of installation files for the database.

V982063-01.zip

opatchFileNames

Ordered list of OPatch installers used for the Oracle DB engine. Only one value is valid.

p6880880_190000_Linux-x86-64.zip

Note

If you include a psuRuPatchFileNames or OtherPatchFileNames section (or both), the opatchFileNames section is required.

Values for opatchFileNames must start with p6880880_.

psuRuPatchFileNames

The PSU and RU patches for this database.

p32126828_190000_Linux-x86-64.zip

OtherPatchFileNames

The patches that aren't in the list of PSU and RU patches. RDS Custom applies these patches after applying the PSU and RU patches.

p29213893_1910000DBRU_Generic.zip

p29782284_1910000DBRU_Generic.zip

p28730253_190000_Linux-x86-64.zip

p29374604_1910000DBRU_Linux-x86-64.zip

p28852325_190000_Linux-x86-64.zip

p29997937_190000_Linux-x86-64.zip

p31335037_190000_Linux-x86-64.zip

p31335142_190000_Generic.zip

If you include a JSON field, it can't be empty. For example, the following manifest is invalid because otherPatchFileNames is empty.

{ "mediaImportTemplateVersion": "2020-08-14", "databaseInstallationFileNames": [ "V982063-01.zip" ], "opatchFileNames": [ "p6880880_190000_Linux-x86-64.zip" ], "psuRuPatchFileNames": [ "p32126828_190000_Linux-x86-64.zip" ], "otherPatchFileNames": [ ] }

Validating the CEV manifest

Optionally, verify that manifest is a valid JSON file by running the json.tool Python script.

For example, if you change into the directory containing a CEV manifest named manifest.json, run the following command.

python -m json.tool < manifest.json

Adding necessary IAM permissions

The IAM principal that creates the CEV must have either of the following policies:

  • The AdministratorAccess policy

  • The AmazonRDSFullAccess policy with the following additional permissions:

    • The mediaimport action

    • Get and list access to the Amazon S3 bucket that contains the installation files

The following JSON example grants access to mediaimport and Amazon S3.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AccessToS3MediaBucket", "Effect": "Allow", "Action": [ "s3:GetObjectAcl", "s3:GetObject", "s3:GetObjectTagging", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::my-custom-installation-files", "arn:aws:s3:::my-custom-installation-files/*" ] }, { "Sid": "PermissionForByom", "Effect": "Allow", "Action": [ "mediaimport:*" ], "Resource": "*" } ] }

You can also grant similar permissions for Amazon S3 to callers' accounts using an S3 bucket policy.

Creating a CEV

You can create a CEV using the AWS Management Console or the AWS CLI. Typically, the creation time is about two hours.

You can then use the CEV to create an RDS Custom instance. The Amazon S3 bucket containing your installation files must be in the same AWS Region as your CEV. Otherwise, creation fails.

For more information, see Creating an RDS Custom for Oracle DB instance.

To create a CEV

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Custom engine versions.

    The Custom engine versions page shows all CEVs that currently exist. If you haven't created any CEVs, the page is empty.

  3. Choose Create custom engine version.

  4. For Engine type, choose Oracle.

  5. For Edition, choose Oracle Enterprise Edition. Oracle Enterprise Edition (Oracle RAC option) isn't supported.

  6. For Major version, choose Oracle 19c.

  7. In Version details, enter a valid name in Custom engine version name.

    The name format is 19.customized_string. You can use 1–50 alphanumeric characters, underscores, dashes, and periods. For example, you might enter the name 19.my_cev1.

    Optionally, enter a description for your CEV.

  8. For S3 location of manifest files, enter the location of the Amazon S3 bucket that you specified in Uploading your installation files to Amazon S3. For example, enter s3://my-custom-installation-files/806242271698/cev1/.

  9. In the RDS Custom encryption section, select Enter a key ARN to list the available AWS KMS keys.

    Then select your KMS key from the list. An AWS KMS key is required for RDS Custom. For more information, see Make sure that you have a symmetric AWS KMS key.

  10. Choose Create custom engine version.

    If the CEV manifest has an invalid form, the console displays Error validating the CEV manifest. Fix the problems, and try again.

The Custom engine versions page appears. Your CEV is shown with the status Creating. Creation takes approximately two hours.

To create a CEV by using the AWS CLI, run the create-custom-db-engine-version command.

The following options are required:

  • --engine custom-oracle-ee

  • --engine-version cev, where cev is the name of your custom engine version

  • --kms-key-id

  • --manifest manifest_string

    Newlines aren't permitted in manifest_string. If you copy the following string, remove all newlines before pasting it into your command.

    The manifest_string string is as follows:

    "{\"mediaImportTemplateVersion\": \"2020-08-14\",\"databaseInstallationFileNames\": [\"V982063-01.zip\"],\"opatchFileNames\": [\"p6880880_190000_Linux-x86-64.zip\"],\"psuRuPatchFileNames\": [\"p32126828_190000_Linux-x86-64.zip\"],\"otherPatchFileNames\": [\"p29213893_1910000DBRU_Generic.zip\",\"p29782284_1910000DBRU_Generic.zip\",\"p28730253_190000_Linux-x86-64.zip\",\"p29374604_1910000DBRU_Linux-x86-64.zip\",\"p28852325_190000_Linux-x86-64.zip\",\"p29997937_190000_Linux-x86-64.zip\",\"p31335037_190000_Linux-x86-64.zip\",\"p31335142_190000_Generic.zip\"]}"

  • --database-installation-files-s3-bucket-name s3-bucket-name, where s3-bucket-name is the bucket name that you specified in Uploading your installation files to Amazon S3. The AWS Region in which you run create-custom-db-engine-version must be in the same AWS Region as the bucket.

You can also specify the following options:

The following example creates a CEV named 19.my_cev1.

For Linux, macOS, or Unix:

aws rds create-custom-db-engine-version \ --engine custom-oracle-ee \ --engine-version 19.my_cev1 \ --database-installation-files-s3-bucket-name my-custom-installation-files \ --database-installation-files-s3-prefix 123456789012/cev1 \ --kms-key-id my-kms-key \ --description "some text" \ --manifest manifest_string

For Windows:

aws rds create-custom-db-engine-version ^ --engine custom-oracle-ee ^ --engine-version 19.my_cev1 ^ --database-installation-files-s3-bucket-name s3://my-custom-installation-files ^ --database-installation-files-s3-prefix 123456789012/cev1 ^ --kms-key-id my-kms-key ^ --description "some text" ^ --manifest manifest_string

Get details about your CEV by using the describe-db-engine-versions command.

aws rds describe-db-engine-versions \ --engine custom-oracle-ee \ --include-all

The following partial output shows the engine, parameter groups, and other information.

"DBEngineVersions": [ { "Engine": "custom-oracle-ee", "Status": "available", "DBParameterGroupFamily": "custom-oracle-ee-19", "DBEngineVersionArn": "arn:aws:rds:us-west-2:<my-account-id>:cev:custom-oracle-ee/19.my_cev1/0a123b45-6c78-901d-23e4-5678f901fg23", "MajorEngineVersion": "19", "SupportsReadReplica": false, "SupportsLogExportsToCloudwatchLogs": false, "EngineVersion": "19.my_cev1", "DatabaseInstallationFilesS3BucketName": "my-custom-installation-files", "DBEngineDescription": "Oracle Database server EE for RDS Custom", "SupportedFeatureNames": [], "KMSKeyId": "arn:aws:kms:us-east-2:<your-account-id>:key/<my-kms-key-id>", "SupportsGlobalDatabases": false, "SupportsParallelQuery": false, "DatabaseInstallationFilesS3Prefix": "123456789012/cev1", "DBEngineVersionDescription": "some text", "ValidUpgradeTarget": [], "CreateTime": "2021-06-23T20:00:34.782Z" } ]

CEV creation failure

If CEV creation fails, RDS Custom issues RDS-EVENT-0196 with the message Creation failed for custom engine version 19.cev_name, and includes details about the failure. For example, the event prints missing files.

You can't modify a failed CEV. You can only delete it, then try again to create a CEV after fixing the causes of the failure. For information on troubleshooting the reasons for CEV creation failure, see Troubleshooting custom engine version creation for RDS Custom for Oracle.

Modifying CEV status

You can modify a CEV using the AWS Management Console or the AWS CLI. You can modify the CEV description or its availability status. Your CEV has one of the following status values:

  • available – You can use this CEV to create a new RDS Custom DB instance or upgrade a DB instance. This is the default status for a newly created CEV.

  • inactive – You can't create or upgrade an RDS Custom instance with this CEV. You can't restore a DB snapshot to create a new RDS Custom DB instance with this CEV.

You can change the CEV from any supported status to any other supported status. You might change status to prevent the accidental use of a CEV or make a discontinued CEV eligible for use again. For example, you might change the status of your CEV from available to inactive, and from inactive back to available.

To modify a CEV

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Custom engine versions.

  3. Choose a CEV whose description or status you want to modify.

  4. For Actions, choose Modify.

  5. Make any of the following changes:

    • For CEV status settings, choose a new availability status.

    • For Version description, enter a new description.

  6. Choose Modify CEV.

    If the CEV is in use, the console displays You can't modify the CEV status. Fix the problems, and try again.

The Custom engine versions page appears.

To modify a CEV by using the AWS CLI, run the modify-custom-db-engine-version command. You can find CEVs to modify by running the describe-db-engine-versions command.

The following options are required:

  • --engine custom-oracle-ee

  • --engine-version cev, where cev is the name of the custom engine version that you want to modify

  • --status status, where status is the availability status that you want to assign to the CEV

The following example changes a CEV named 19.my_cev1 from its current status to inactive.

For Linux, macOS, or Unix:

aws rds modify-custom-db-engine-version \ --engine custom-oracle-ee \ --engine-version 19.my_cev1 \ --status inactive

For Windows:

aws rds modify-custom-db-engine-version ^ --engine custom-oracle-ee ^ --engine-version 19.my_cev1 ^ --status inactive

Deleting a CEV

You can delete a CEV using the AWS Management Console or the AWS CLI. Typically, deletion takes a few minutes.

To delete a CEV, it can't be in use by any of the following:

  • An RDS Custom DB instance

  • A snapshot of an RDS Custom DB instance

  • An automated backup of your RDS Custom DB instance

To delete a CEV

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Custom engine versions.

  3. Choose a CEV whose description or status you want to delete.

  4. For Actions, choose Delete.

    The Delete cev_name? dialog appears.

  5. Enter delete me, and then choose Delete.

    In the Custom engine versions page, the banner shows that your CEV is being deleted.

To delete a CEV by using the AWS CLI, run the delete-custom-db-engine-version command.

The following options are required:

  • --engine custom-oracle-ee

  • --engine-version cev, where cev is the name of the custom engine version to be deleted

The following example deletes a CEV named 19.my_cev1.

For Linux, macOS, or Unix:

aws rds delete-custom-db-engine-version \ --engine custom-oracle-ee \ --engine-version 19.my_cev1

For Windows:

aws rds delete-custom-db-engine-version ^ --engine custom-oracle-ee ^ --engine-version 19.my_cev1