Getting template for a s3 bucket - amazon-web-services

It is possible to get a template (yml) for a s3 bucket created using the web console?.
I just want to see how was configured a particular s3, but see it in a template form.

Yes, this should be possible with the new AWS tool called CloudFormer. The tool is still in beta though.
CloudFormer is a template creation beta tool that creates an AWS CloudFormation template from existing AWS resources in your account. You select any supported AWS resources that are running in your account, and CloudFormer creates a template in an Amazon S3 bucket.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-cloudformer.html

Related

CloudFormation - obtaining template from a repo

Can someone list for me the steps needed in order to obtain a template from Azure DevOps repo and have AWS Cloud Formation use it to build a stack.
Interested in best practices and some high-level steps please / requirements E.G. do I need AWS Pipelines? AWS Azure Toolkit?
One of the cleaner ways that I could think of doing this is integrating your DevOps repository with an S3 bucket and then triggering AWS CodePipeline to deploy the stack from the S3 bucket.
The flow would be something like,
Create a bucket in S3 to hold the cf template
Create a service connection request in DevOps repo, this should push the template to S3 every time changes are deployed
Create an AWS CodePipeline workflow that takes the template as input from S3 and deploys it to CloudFormation

How to convert AWS ClouldWatch Dashboard into CloudFormation template

I have created a Cloudwatch dashboard via AWS Console. Now I would like to convert it to its Cloudformation template for future deployment.
Is there any solution?
You could probably use former2 to generate CloudFormation template based on your existing dashboards.

Amplify Cloudformation templates

My understanding of Amplify is that on amplify push, it somehow processes the separate cloudformation templates for each service (including the parameters.json) and deploys the app. Where does this "master" cloudformation template get stored. For example in the API resource, there is an api-params.json file specifying the endpoint restrictions based on auth roles, but I do not see those in the api cloudformation template. How would I see the final template with the auth restrictions applied to the API Gateway resources?
You can see your nested Stack and all the templates in the AWS Console -> CloudFormation.
You can see the templates in your code repository locally after performing amplify pull in the amplify/backend/#current-cloud-backend
You can see the templates stored in S3 in your deployment bucket e.g., s3://amplify-appName-envName-someId-deployment/amplify-cfn-templates

How to replicate all resources/stack to another aws account?

I am trying to clone my aws account(prod) to another account(test) with all resources and configuration I have set up on prod. Is there any best practice to replicate the aws account to another?
This is not possible.
Nor is there an easy way to list all resources in an AWS account.
Each AWS Service (eg EC2, S3, Lambda) have their own API calls to list resources and describe configurations. There is no universal way to request this information.
Best Practice is to only create resources using AWS CloudFormation templates, thereby having full documentation of resources created and the ability to deploy similar infrastructure in other AWS accounts or regions.
Some third-party services (eg https://www.hava.io/) can extract configuration information and automatically create AWS CloudFormation templates. However, these templates only record the configuration of AWS resources -- they do not replicate the content of storage on disks, Amazon S3 or databases.

Is there a way to create AWS Dashboard using cloudformation or AWS CLI

I wanted to create an AWS Dashboard using cloudformation but did find a way.
Guess AWS has not yet added support for that.
As an alternative is it possible to create that using AWS CLI
AWS just announced support for this.
https://aws.amazon.com/blogs/aws/new-api-cloudformation-support-for-amazon-cloudwatch-dashboards/
CloudFormation documentation is also available: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dashboard.html
If I'm correct your question is concerns Resource Groups. It is not possible at this time to create Resource Group in Cloud Formation Templates or via the awscli.
Resource Groups are tied to a User, not an account - so it's not possible to define them at an account level and allow Users to access them.
It's possible for a User to 'Share' a Resource Group they've created by passing a URL to another User.