Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 months ago.
Improve this question
I'm from Azure background and trying to learn AWS.
I'm creating multiple services/resources like EC2, S3, Lambda, etc in my AWS account. I'm not a root user.
My question
How can I find/list all the resources created by me? I want the ability to quickly see/list all the resources created by me to do cleanup.
Note: In Azure, I can do this by creating resources under a specific Resource group or I can tag them, later I can open a specific resource group to find all the resources that I've created or filter by tag. Is there any similar feature in AWS?
Thanks
First approach:
There is no single command that can list all resources in an AWS account.
You should use the AWS Management Console or make API calls to any service, in any region, to get a list of the resources created.
A good place to start is the billing console, which can show you which services have been used in which region. You can then log into any of these services and regions to see the resources.
Second approach:
You can use the AWS Configuration Service to create an inventory of all your AWS resources for supported AWS services. An inventory acts as a CMDB for your AWS landscape and records all configuration changes.
To know how to configure, refer here
Third approach:
You can also use Tag Editor which will also allows you to edit the tags for all your AWS resources.
To know how to configure, refer here
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I need to setup Hashicorp vault on aws with cross region setup in HA. And I gotta do it with complete automation , what would be the best IAC tool , Cloudformation- I found very less documentation on this for vault setup. Or Terraform - ?
has some one achieved it by complete automation method on aws. ?
Terraform is not a Configuration Management tool, It's an IaC tool. You can use Terraform to create underline infrastructure for your Vault setup and it should not use to provision applications in the infrastructure. Of course, you can install applications in your EC2s using exec remote provisioner, but you should use provisioners as the last resort.
So I think of using Terraform for creating the infrastructure of the Vault setup. But you need to use some other tools like Ansible or Puppet to provision software in your infrastructure. Using IaC tools for configuration management will create major technical confusion in the long run.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
We are building a small micro service architecture which we would like to deploy to AWS.
The number of services is growing, so we need solution that allows scaling (horizontal).
What's the best way to build this on AWS? We don't have too much experience with docker, we used EC2 based stuff in the past.
I'm thinking about something like:
Use ECR, create a private docker repository. We push release images there.
Use ECS to automatically deploy those images.
Is this correct? Or should we go for Kubernetes instead? Which one is better?
Our needs:
Automated deployments based on docker images
Deploy to test and prod environments
Prod cluster should be able to handle multiple instances of certain services with load balancing.
Thanks in advance for any advice!
AWS container service team member here. Agreed with others that answers may potentially be very skewed to personal opinions. If you come in with good AWS knowledge but no container knowledge I would suggest ECS/Fargate. Note that deploying on ECS would require a bit of CloudFormation mechanics because you need to deploy a number of resources (load balancers, IAM roles, etc) in addition to ECS tasks that embeds your containers. It could be daunting if not abstracted.
We have created a few tools that allows you to offload some of that boiler plating. In order of what I would suggest for your use case:
Copilot which is a CLI tool that can prepare environments and deploy your app according to specific patterns. Have a look here
Docker Compose integration with ECS. This is a new integration we built with Docker that allows you to start from a simple Docker Compose file and deploy to ECS/Fargate. See here.
CDK is a sw development framework to define your AWS infrastructure as code. See here. These are the specific CDK ECS patterns if you want to go down that route.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I would like to create my own cluster structure on Amazon Cloudformation. I have 3 servers. 2 server Nginx and other one MySQL server. I create a cluster structure with my own shell script. Is it possible to create with AWS CloudFormation ? How can I get MySQL server IP address then how can I use this IP address in my shell script? (on Nginx servers).
Thanks for your all help.
If the CloudFormation template is creating a resource (eg an Amazon EC2 instance), other parts of the template can refer (!Ref) to that resource.
While defining the EC2 instances running nginx, you would be providing a User Data script that will be executed when the instance starts. Inside the CloudFormation template, where the script is defined, it is possible to !Ref another part of the script. CloudFormation will automatically insert that referenced information (such as the database instance's IP address).
For some examples, see:
Resources - AWS CloudFormation
Reference Parameter Value in UserData in AWS Cloudformation
Understanding AWS CloudFormation !Sub Syntax
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is the difference between provisioning using AWS CloudFormation UserData vs. Ansible?
I know that in relation to Puppet for example, it enforces provisioning rules even when a change is done (changes it back to reflect the manifest).
But are there more differences which are worth taking into consideration?
To clarify, "UserData" is part of an EC2 instance, not part of CloudFormation itself. EC2 instances can be launched with User Data, which can be used by the AMI to perform dynamic operations on startup. If CloudFormation is used to launch an EC2 instance, it can provide User Data to the EC2 instance by setting the UserData property on the AWS::EC2::Instance Resource.
Typically, user data is processed by Cloud-Init, and is typically formatted as a simple User-Data Script which is just a shell script that gets invoked on the instance when it is first launched.
That said, 'Shell script vs. Ansible' is an apples-to-oranges comparison. Whether or not Ansible is the appropriate software for your use-case depends on whether you need to use the extra layers of abstraction built into Ansible versus a standard shell script to provision what's needed on your instance. Read the Ansible Documentation and decide for yourself.
It is worth mentioning that aside from the normal 'push' method of running Ansible to provision your instance via SSH, you can also run Ansible in an inverted, 'Ansible-pull' mode, using a User-Data Script to perform the initial 'bootstrap' installation on the EC2 instance.
The short answer is: Use CloudFormation or Terraform
Ansible is a configuration managment tool for many diffrent purposes. The most significant diffrence to many of the other tools is, that is is working in a push mode, so there are no agents on the remote server polling for changes.
It is great when it's about installing packages, creating files and so on.
CloudFormation is desinged to create AWS enviroments. This is good if you onyl use Amazon and nothing else.
Ansible can do the job, but i would recommend to use a tool like CloudFormation or Terraform. The Ansible modules for this are ok, but tools like Terraform have a fokus on creating enviroments and they are much smarter when doing the job.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have an AWS EC2 instance that I would like to have various relevent people stop and start. In a perfect world I would like a really simple way for a select handful of people to stop and start an EC2 instance without giving them too many permissions. If I could make it so they just click 1 button to do it, that would be perfect.
Starting/Stopping an Amazon EC2 instance can be done via the:
AWS Management Console
AWS Command-Line Interface (CLI)
AWS SDK for many popular programming languages
The important thing to realize is that users do not have do issue the stop/start command themselves! They can use an in-between system that makes the call for them.
For example, if you have internal intranet, you could configure some code to start/stop instances when a user requests it via the website. The website would then issue the command to AWS (via the CLI or SDK), without the users themselves requiring any special access credentials (they just need access to your internal website).
This is similar to your "just click 1 button" idea, with the button being on your intranet.