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.
Related
We have a few different AWS accounts and I am looking to migrate the SNS configuration from one AWS account to another. Is that possible to migrate?
Many thanks for considering my request.
AWS does not have a 'migrate' capability.
A best-practice is to deploy "infrastructure as code" using CloudFormation or Terraform. Then, when you wish to deploy the same infrastructure to a different AWS Account, simply use the same template to deploy it.
If you did not deploy your initial infrastructure via a template, you might want to use https://former2.com/ to create a template based on existing infrastructure. You can then use that template to deploy the same resources in a different AWS Account.
Is it possible within AWS Cloud formation to Conditionally create AWS resources based on Lambda APi response.
for e.g
Let's say, we have a requirement to execute Lambda API with some parameter based on which validations will be done and there will be response like {"valid": false|true} .
Based on this response field, we should either create AWS resource like EC2 or return failure to the user with some message.
I could not find anything much in Cloud Formation documentation related to this and conditional expression in the documents referenced the parameters passed to the CFT as inputs.
Any suggestions or approach to tackle this scenario ?
You have to develop custom resources or your own cloudformation template macro to achieve what you want.
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
How to export existing configured and tested infrastructure (including AWS Lambda functions, API Gateways, ElastiCache clusters, Cloudwatch rules) to Cloudformation template?
I know about Cloudformer tool, but it supports limited number of AWS services (Amazon VPC, DynamoDB, etc) and don't supports some of services which we use. Which tools and approaches can I use in my case for generating Cloudformation template?
Partial solution: there is ability to export Lambda function to AWS SAM file
and then
We will get YAML file which describes your Lambda function as 'AWS::Serverless::Function'. But there are few things - we can't export Lambda aliases with such approach. Also that doesn't help with API Gateway exporting.
CloudFormer was built for this, however, I agree with #MaiKaY that you should rewrite everything. CloudFormer will create hard-links with IDs, where you have to replace these with references, add parameters and/or mappings. It can help you get started, so you know what you need in the template.
Does AWS CloudFormation allow creating templated for AWS Elastic Transcoder?
PS: I tried creating a DataPipeline, but no that is not the same as Transcoder pipeline
Not yet. The following page shows all available resource types for AWS Cloudformation:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
You could use a python lambda function wrapped in a custom resource. With Lambda support in custom resources, services/features not currently supported can be accommodated in the template.
This github project shows how
https://github.com/mazerte/aws-cloudformation-elastic-transcoder-pipeline