What is required for the id parameter of the aws.s...
# general
h
What is required for the id parameter of the aws.s3.Bucket.get function. The documentation says "The unique provider ID of the resource to lookup." which is at best ambiguous. What exactly is it expecting?
b
In the case of S3 buckets, it's just the name of the bucket. Not to be confused the `name`parameter of that method which is the name you're giving the result of that method in the stack
So if I had a bucket that was named
piers-bucket
then I'd call it with
const bucket = aws.s3.Bucket.get("my-bucket", "piers-bucket");
And then in the stack the reference to it would be a called
my-bucket
👍 1
h
Thanks @brave-planet-10645
g
@brave-planet-10645 This took me some time to understand as well. I noticed that in Azure it uses UUID, I think it would be probably be good and more intuitive for AWS resources to use
arn
b
This would be a massive breaking change that I'm pretty sure we won't be doing right now. Also, the AWS SDK runs off bucket name (see here for an example) and we'd probably want to align with that going forward.