Stop AWS OpenSearch service temporarily for cost savings - amazon-web-services

I am looking at doing some cost savings in AWS and want to know if we can stop and then start the AWS Opensearch service for a couple of days.
My scenario is that the application which uses the OpenSearch service (Elasticsearch) remains down during 2 days every week... During this time OpenSearch remains active and incurs costs...
I know one option to save the costs is to downgrade the node type and reduce the number of nodes during the application downtime.
But let me know if there are any other options where I can entirely "Switch Off" and "Switch On" the service just like we can do with EC2 instances.

There is no way to stop the cluster today. What I have seen to reduce bill was that team edited the cluster to reduce the instance type to a t2.small (or smaller ones) instance which is significantly cheaper than the previous instance.
Then when they needed to resume testing they changed the instance type back to what they required.
One other thing maybe is to take a snapshot of your domain, the disable Opensearch for the weekend. Finally restore it back on monday with the snapshot you got.

AWS launched OpenSearch Serverless during reInvent 2022 but still in preview.
This is the ideal solution which would not require you manage clusters.
https://aws.amazon.com/opensearch-service/features/serverless/
Until then, go for downsizing the instance during non peak hours.
[Edit]: It is GA now as on 25th Jan 2023
https://aws.amazon.com/blogs/big-data/amazon-opensearch-serverless-is-now-generally-available/

Related

GCP - Cluster and database are turned off, but I am still charged

Please, I have a problem, that I have turned off my database and cluster, but I am still charged with only small price difference.
Commnand for turning off Cluster:
gcloud container clusters resize dev-cluster --num-nodes=0
--zone=europe-west3
For database:
gcloud sql instances patch app-dataase-dev --activation-policy NEVER
The one cluster and Sql database is only one and one. Yesterday 7th Jan., it was whole day turned off and I am still charged for almost same price, like it was not. I am sure that pool was empty and database was turned off. Also check the days before. At 3 - 5. Jan it was running like 5 hours per day and price difference is almost nothing.
I am not able to reach GCP support, because I am not on paid program.
Please could anyone help me find solution for this?
From Pricing:
GKE clusters accrue a management fee of $0.10 per cluster per hour, irrespective of cluster size or topology
This is probably the cause of the continued charges you are seeing for your cluster. Although one zonal cluster per billing account should be free according to the same documentation.
I would suggest contacting Billing Support, which is available for all Google Cloud accounts irrespective of any Technical Support plan you may or may not have.
If you are not using your Cluster you can delete it to avoid future charges:
gcloud container clusters delete
gcloud container clusters delete NAME [NAME …] [--async] [--region=REGION | --zone=ZONE, -z ZONE] [GCLOUD_WIDE_FLAG …]
Same thing for your sql instance, you can delete your instance:
gcloud sql instances delete [INSTANCE_NAME]
Even though your Cluster has 0 nodes and your instance is not receiving data, they are still using resources that is why you see that charge.
Additionally, Keep in mind that your Billing report is associated with your Billing Account, and if this Billing Account is linked to other projects that are generating costs, those costs will be reflected in the Billing Report.
To confirm if billing is enabled on a project you could consult the following documentation
Its long responses. I will add only results:
Its true, that you are billed $0.10 per cluster hour. #Nahuel.
To disable all paid features you need to disable billing for a project:
disable billing
then
enable billing, but After 30 days with disabled billing, all resources will be destroyed.
Also they said, that if you want to keep your project running, and fully turn off, you need to destroy it all.
I will go with turning off whole project, which is ok now for me. I have there only dev things. I hope this could be helpful for others, who would like to save some money.
Thanks to responders for help! :)

Does cost of EC2 on AWS increase at the same rate as user count?

I'm getting ready to launch a mobile app that I have hosted on AWS with an EC2 instance. ($0.0464 per On Demand Linux t2.medium Instance Hour).
This past month I was charged $112 for the EC2 usage, but only had a handful of internal users testing the private version of the app. It's a fairly simple app, not anything that should require a lot of computing power.
So what I'm wondering is if 10 users and dev team costs $112/mo, what happens if I get 1,000 users, or 10k users? Would the cost increase 100x, 1000x? I can't imagine getting auto-billed for $112,000 for a month of service with a small user base like 10k users.
Thanks for any help and guidance, I don't know much about AWS.
Here are the details of my billing for last month:
The billing page shows 2219 hours of t2.medium during this billing month.
That is the equivalent of 92 days. So, it might be 3 instances running for a full month.
Amazon EC2 is charged when the instance is in the Running state. If you are not using an instance, you can Stop the instance. The attached disks (EBS) will still be charged, but there will be no charge for the instance itself.
The charge is not based on the number of users, nor how 'busy' the instance is. It is simply charged when the instance is 'running'. This is because computer resources are exclusively assigned to instances (CPU, RAM) that nobody else can use.
Bottom line: Stop instances that you don't need. Use the smallest instance type for your use-case to reduce costs.
If you were not aware of the charges involved, you can contact AWS Customer Service and request a refund.
FYI, the T2 and T3 family are great for workloads that occasionally 'burst' but then have low-usage periods, but they are not great for sustained workloads. See: Burstable performance instances - Amazon Elastic Compute Cloud

AWS EC2 t3.micro instance sufficiently stable for spring boot services

I am new to AWS and recently set up a free t3.micro instance. My goal is to achieve a stable hosting of an Angular application with 2 spring boot services. I got everything working, but after a while, the spring boot services are not reachable anymore. When i redeploy the service it will run again. The spring boot services are packed as jar and after the deployment the process is started as a java process.
I thought AWS guarantees permanent availability out of the box. Do i need some more setup such as autoscaling to achieve the desired uptime of the services or is the t3.micro instance not suffienciently performant, so that i need to upgrade to a stronger instance to avoid the problem?
It depends :)
I think you did the right thing by starting with a small instance type and avoid over provisioning in the first place. T3 instance types are generally beneficial for 'burst' usage scenarios i.e. your application sporadically needs a compute spike but not a persistent one. T3 instance types usually work with credits based system, where you instance 'earns' credits when it is idle, and that buffer is always available in times of need (but only until consumed entirely). Then you need to wait for some time window again and earn the credits back.
For your current problem, I think first approach can be to get an idea of the current usage by going through the 'Monitoring' tab on the EC2 instance details page. This will help you understand if the needs are more compute related or i/o related and then you can choose an appropriate instance type from :
https://aws.amazon.com/ec2/instance-types
Next step could also be to profile your application and understand the memory, compute utilisation better. AWS does guarantee availability/durability of resources, but how you consume those resources is more of an application thing, which AWS does not guarantee/control
For your ideas around, autoscaling and availability, it again depends on what your needs are in terms of cost, outages in AWS data centres etc. To have a reliable production setup, you could consider them, but not something really important in the first place.

awscli list all objects created by ownerid?

I'm trying to stay within the limits of my free tier, however, I notice I am being charged ~$1.50 a day for something, I don't know what.
I've terminated all my instances, yet the bill keeps ticking up every day.
I've also deleted all my security groups, route-tables, nat-gateway, subnets and vpc, everything I can think of. Something is still there creating charges though.
How can I get a list of all the objects still hanging around?
You can add a support request to AWS, there are very responsive to the requests. I had a student account on AWS and some Fargate charges were added to my account. I opened a case and submitted a ticket in the support centre. They responded quickly with the reason why my charges were occurring and also gave me $20 USD credit for that month. Also, you can check if Termination protection is enabled in any of your stack in CloudFormation. It stops your instances from being deleted.
you can contact aws support centre for more info. after deleting all instances and other services wait for 24-48 hour. it will be reflected in billing after that much amount of time.
you can go inside cloud formation and delete all stack if any one is there and check for all region.
also if you created load balancer delete it manually it will be not deleted with EC2 instances.

How to shut down AWS test environment on a particular time

We have a test environment on a AWS elastic beanstalk and I would like to shut this down on weekends and hours not using.
When inquired I got information about a third party tool that does that which I have to pay extra 50$ a month.
Does anybody any how to automatically shutdown/restart ec2 instances/elastic-beanstalk on AWS ?
Please note I am fairly new to AWS and I tried finding out to see if I can do this easily but unable to.
Thanks for any directions.
You can use a solution from AWS: Instance Scheduler
https://aws.amazon.com/answers/infrastructure-management/instance-scheduler/
It's based on instances tags.
If you have an AutoScaling Group in your stack, you can use:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html
With a simple cron expression, you will schedule the size of your ASG.
Skeddly offers 100 free events free tier which would cover your use case https://www.skeddly.com/pricing/
I manage a small development account with 8 EC2 instances, 2 autoscaling groups, and 2 RDS instances, and I schedule them for use about 200 hours a month (approx 50 hours a week.)
I get significant savings over demand and even reserved instances by this type of scheduling tool. I pay about $10 per month. This is a good value, compared to building an maintaining your own scheduler.
Usual disclaimer: Just a happy customer.