I do a SAM deployment from my local console. With sam package ... --s3-bucket xy
I specify the existing s3-bucket where deployment relevant objects are stored. I want that bucket to appear in the Output
section in Cloudformation but I don't know how to reference it.
If I look under Template
in the web console I see the path:
Resources:
MyLambda:
Properties:
CodeUri: s3://xy/1b26f7841...
So I tried to add
Outputs:
SourceBucket:
Value: !GetAtt MyLambda.Properties.CodeUri
to my template.yaml, but the deployment fails with Requested attribute Properties.CodeUri does not exist in schema for AWS::Lambda::Function