Hope I find you well -- I'm trialling Pulumi for s...
# general
t
Hope I find you well -- I'm trialling Pulumi for some AWS IaC work using Python. A part of our stack operations is initiating a snapshot copy from a different region (
us-east-1
) into the current one,
aws.config.region='us-east-2'
. I'm observing that the
destination_region
parameter in this invocation has no effect, causing the incorrect behavior of a copy inside the source region. (Also, the ergonomics for the source are a bit weird, but I can live with that). I wonder how I can trace the way the Python code is converted into an AWS primitive. I've run the command manually using the AWS console, and AWS does perform inter-region copies when requested to do so.
Copy code
copied_snapshot = aws.rds.SnapshotCopy(f"db-snapshot-copy-{environment_identifier}",
        source_db_snapshot_identifier=db_snapshot_identifier,
        target_db_snapshot_identifier=target_snapshot_name,
        destination_region=aws.config.region,
        kms_key_id=None,  # Use default KMS key
        tags={
            "Name": f"hero-db-snapshot-copy-{environment_identifier}",
            "Environment": environment_identifier,
        },
        opts=pulumi.ResourceOptions(provider=aws_source_region),
    )
e
Can you raise an issue at github.com/pulumi/pulumi-aws about this. There isn't an easy way to trace this though the system, it will go to the engine, then to the aws provider, then to the aws API. Simplest check would probably to run wireshark or similar to capture what the final api call looks like.
t