If both mentioned:
--vpc-security-group-ids sg-0614fbf3b6c8efc95 \
--db-security-groups vpc-dfed7cbb \
gives following error:
{code}
root@percona03-251:/data/xfs/scripts # sh rds_creation.sh
An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: DB Security Groups and Vpc Security Groups cannot both be provided.
{code}
If only --db-security-groups vpc-dfed7cbb is mentioned:
{code}
root@percona03-251:/data/xfs/scripts # sh rds_creation.sh
An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: DB Security Groups can only be associated with VPC DB Instances using API versions 2012-01-15 through 2012-09-17.
root@percona03-251:/data/xfs/scripts #
{code}
If only vpc-security-group-ids sg-0614fbf3b6c8efc95 is mentioned:
{code}
root@percona03-251:/data/xfs/scripts # sh rds_creation.sh
An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: The DB instance and EC2 security group are in different VPCs. The DB instance is in vpc-fe7f8a94 and the EC2 security group is in vpc-dfed7cbb
root@percona03-251:/data/xfs/scripts #
{code}
Below is my RDS instance creation command :
aws rds restore-db-instance-from-s3 \ --allocated-storage 100 \ --db-instance-identifier rds-cli-test \ --db-instance-class db.t3.small \ --engine mysql \ --engine-version 5.6.44 \ --license-model general-public-license \ --master-username bokuadmin \ --master-user-password test12345 \ --port 3306 \ --s3-bucket-name boku-rds-dev \ --s3-ingestion-role-arn arn:aws:iam::534542242265:role/RDSRestoreFromS3_Role \ --source-engine mysql \ --source-engine-version 5.6.44 \ --vpc-security-group-ids vpc-dfed7cbb \ --availability-zone eu-west-1c \ --no-publicly-accessible \ --storage-type gp2 \ --no-storage-encrypted \
It fails due to VPC related issues.
I tried all 3 possible options :
If both mentioned: --vpc-security-group-ids sg-0614fbf3b6c8efc95 \ --db-security-groups vpc-dfed7cbb \ gives following error: {code} root@percona03-251:/data/xfs/scripts # sh rds_creation.sh An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: DB Security Groups and Vpc Security Groups cannot both be provided. {code}
If only --db-security-groups vpc-dfed7cbb is mentioned: {code} root@percona03-251:/data/xfs/scripts # sh rds_creation.sh An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: DB Security Groups can only be associated with VPC DB Instances using API versions 2012-01-15 through 2012-09-17. root@percona03-251:/data/xfs/scripts # {code}
If only vpc-security-group-ids sg-0614fbf3b6c8efc95 is mentioned: {code} root@percona03-251:/data/xfs/scripts # sh rds_creation.sh An error occurred (InvalidParameterCombination) when calling the RestoreDBInstanceFromS3 operation: The DB instance and EC2 security group are in different VPCs. The DB instance is in vpc-fe7f8a94 and the EC2 security group is in vpc-dfed7cbb root@percona03-251:/data/xfs/scripts # {code}