1 Answer
- Newest
- Most votes
- Most comments
2
Hello.
As of May 2024, as far as I know, I don't think it's possible to get the S3 bucket name where the template is stored with the AWS CLI's CloudFormation command.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/index.html
If you use the "--s3-bucket" option of the "aws cloudformation deploy" command, you can specify the S3 bucket to upload to, so you may not need to search for the S3 bucket.
By the way, please note that the bucket specified with "--s3-bucket" must be an S3 in the same region as the stack creation region, or an error will occur.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy.html
So, the "s3api list-buckets" command you are using is a valid method.
Relevant content
- Accepted Answerasked 2 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 10 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
That's what I was afraid of, but thank you for confirming! (And even when we're specifying a location with
--s3-bucket
we're still wanting to use the same bucket as the one that CFN Console uploads to, so to keep things tidy and controlled.) I appreciate your answer!