We have a huge VPC CF Template that we use to define our development, staging, and production environments. One of these resources is a Common S3 bucket for use with tasks not directly related to a specific customer. This bucket has an Export named VPCCommonBucket
which contains just the bucket name.
I am trying to use this Export value in another stack, referencing that bucket, creating an IAM user that has access to ONLY that bucket, further restricting it to a single directory IN that bucket.
When using a Parameter, I can do something like this:
!Sub "arn:aws:s3:::${BucketName}/prefix/*"
But I cannot find something similar with regard to using Fn::ImportValue
/!ImportValue
. Is there a way to insert an exported variable into a string as I'm trying to do here? Or is this a matter of needing to go back and alter our main Template to include ANOTHER Export for the Bucket's arn?