Reputation: 42556
I have below configuration for serverless.yml
. It creates a s3 bucket and exports its ARN and Name. What I don't understand is why the bucket ARN value is get by Fn::GetAtt:: S3Bucket Arn
but the bucket name is get by Ref S3Bucket
. What is the different between these two syntax?
...
Outputs:
AttachmentsBucketArn:
Value:
Fn::GetAtt:
- S3Bucket
- Arn
Export:
Name: ${self:custom.stage}-ExtAttachmentsBucketArn
AttachmentsBucketName:
Value:
Ref: S3Bucket
Export:
Name: ${self:custom.stage}-ExtAttachmentsBucket
Upvotes: 2
Views: 1582
Reputation: 238517
They map directly to return values of AWS::S3::Bucket in CloudFormation.
As the link explains, the use of:
Arn
"returns the Amazon Resource Name (ARN) of the specified bucket."Upvotes: 4