Posts

Showing posts from 2023

How to enable AWS EBS Volume snapshots encryption

Using the AWS console: Sign in to AWS console and navigate to https://console.aws.amazon.com/ec2/ From the left navigation choose snapshots option. Select the actionable snapshot, choose actions. Choose the Copy Snapshot option. Check the encryption option. Under the Master key choose the kms key (It is recommended to choose KMS CMK when EBS snapshot consist of highly sensitive data). Click on copy. Once the newly encrypted snapshot is ready old snapshot should be deleted. Using AWS CLI $> aws ec2 copy-snapshot --description [description-for-new-snapshot] --destination-region [region-name] --encrypted --kms-key-id [kms-key-id] ---source-region [region-name] --source-snapshot-id [actionable-snapshot-id] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/copy-snapshot.html $> aws ec2 delete-snapshot --snapshot-id [actionable-snapshot-id] --region [region-name] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-snapshot.html Note: App

How to prevent identity theft?

  Identity theft happens when anyone steals your personal information, like your name, Social Security number, or credit card info, and uses it for fraud or other criminal activities. Below are some tips to help prevent identity theft: ● Protect your personal information: Be cautious when giving out your personal information online and offline. Don't share your Social Security number, credit card number, or other sensitive information unless you trust the source and must provide it. ● Strong passwords: Strong and unique passwords for all your accounts are must. Also, avoid using the same password for multiple accounts. Use a password manager to store passwords securely. ● Monitor accounts: Frequently review your bank and credit card statements for unauthorized transactions, and check your credit report once a year for any suspicious activity. ● Phishing scams: Emails, texts, or phone calls asking for your personal information or credentials could be a scam. Avoid clicking on links

How to check SSL certificate expiration time through shell script

Image
  In this blog we will learn "How to check SSL certificate  number of days for expiration of our domain" I am going to show here in a Linux environment by using Shell script.  Create file by the name checkssl.sh - sudo nano checkssl.sh Code- Copy this code and save file. data=`echo | openssl s_client -servername $1 -connect $1:${2:-443} 2>/dev/null | openssl x509 -noout -enddate | sed -e 's#notAfter=##'` ssldate=`date -d "${data}" '+%s'` nowdate=`date '+%s'` diff="$((${ssldate}-${nowdate}))" echo $((${diff}/86400)) Output- You will get result as below

The key points of cost optimization and enhanced security for AWS and Azure infrastructure:

1. Cost Optimization: a. Resource Right-Sizing: Begin by analyzing the current resources in use on AWS and Azure. Identify any over-provisioned instances or underutilized resources. Utilize AWS and Azure tools like AWS Trusted Advisor, AWS Cost Explorer, and Azure Cost Management to gain insights into resource utilization and make informed decisions on right-sizing. b. Reserved Instances and Savings Plans: Investigate opportunities to leverage Reserved Instances (RIs) on AWS and Savings Plans on Azure. These commitment-based options can lead to substantial cost savings over pay-as-you-go pricing. c. Auto-Scaling: Implement auto-scaling for AWS and Azure resources to dynamically adjust resource capacity based on demand. This ensures that you are not over-provisioning resources during peak times and are not paying for idle capacity during low-demand periods. d. Storage Optimization: Evaluate your data storage practices, including the use of different storage classes, data archiving,

AWS resource cleanup

  Let's go through each of these areas and discuss some resource cleanup best practices, considerations, and specific actions you can take in the AWS environment 1. EC2 Instances: Regularly review your running instances and identify those that are no longer needed. Terminate instances that are not actively in use. Consider using Amazon EC2 Auto Scaling to dynamically adjust the number of instances based on demand. This can help optimize costs and resource utilization.Use Elastic Load Balancing (ELB) to distribute traffic across multiple instances, improving availability and reducing the impact of instance failures. Consider using AWS Lambda or EC2 instance-based automation to schedule instance start and stop times, particularly for non-production instances. 2. Amazon S3 Buckets: Use AWS Identity and Access Management (IAM) policies to control access to S3 buckets and objects. Regularly audit your S3 buckets to ensure they are not publicly accessible unless required. Implement bucke

AWS top services associated with their costing

  Below are the few AWS services for their potential cost factors: 1.Amazon S3: S3 storage pricing is based on the amount of data stored, data transfer, and number of requests. Costs can vary based on storage class (Standard, Intelligent-Tiering, Glacier, etc.) and region. 2.Amazon ECS: ECS pricing includes costs for the underlying EC2 instances or Faregate resources used to run containers, as well as networking and data transfer costs. 3.Amazon EMR : EMR pricing depends on the instance types used for the cluster, data storage, data transfer, and the processing power needed. 4.AWS IAM: IAM itself is generally not associated with direct costs; you're billed for the resources you manage using IAM. 5.Amazon QuickSight: QuickSight pricing is based on the number of users and the amount of data processed for visualization. 6.AWS Glue: Glue pricing considers factors such as the number of development units (DPU) used for ETL jobs and the amount of data processed. 7.AWS Lambda: Lambda

Google Error - 535-5.7.8 Username and Password not accepted (SMTP Error)

Image
  If you receive this error when sending email through SMTP. Please check below settings in that smtp  account. Step 1- Login into smtp account through web(Browser login) Step 2- Less Secure Apps (Inbox Side): Open this url in same tab after login https://myaccount.google.com/lesssecureapps?pli=1 Step 3- Settings should be same below.  

How to save git token key to avoid again and again put manually

  To avoid entering your Git token key manually every time, you can use Git's credential helper to save and cache your credentials. The following steps outline how to set it up: 1.Open a terminal or command prompt. 2. Set up the Git credential helper by running the following command: git config --global credential.helper cache This command configures Git to use the cache credential helper, which will store your credentials in memory for a certain period of time. 3.Set the cache timeout (optional): git config --global credential.helper 'cache --timeout=3600' This command sets the cache timeout to 3600 seconds (1 hour). After this period of inactivity, Git will prompt you to enter your credentials again. 4.The next time you interact with a remote Git repository that requires authentication, enter your username and password (or token) as you normally would. Git will cache these credentials for the specified timeout period. From now on, you won't have to enter your Git toke

How to delete AWS NAT gateway and Interface

How to delete AWS NAT gateway- If you no longer need a NAT gateway, you can delete it. After you delete a NAT gateway, its entry remains visible in the Amazon VPC console for about an hour, after which it's automatically removed. You cannot remove this entry yourself. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. If you delete a NAT gateway, the NAT gateway routes remain in a blackhole status until you delete or update the routes. Below are the steps to perform this task. 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2 .In the navigation pane, choose NAT Gateways. 3. Select the radio button for the NAT gateway, and then choose Actions, Delete NAT gateway. 4.When prompted for confirmation, enter delete and then choose Delete. How to delete AWS  interface- Below are the steps to perform this task 1.Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2.In the navigation pane, ch

How to run Elastic Beanstalk Application on SSL (https)

To run an Elastic Beanstalk application on SSL (https), you need to perform the following steps: Obtain an SSL certificate: First, you need to obtain an SSL certificate for your domain. You can either purchase one from a certificate authority or use a free SSL certificate from Let's Encrypt.       2.  Upload the SSL certificate to AWS Certificate Manager (ACM): Once you have obtained   the SSL certificate, you need to upload it to the AWS Certificate Manager (ACM). ACM is a service that lets you manage SSL/TLS certificates for your AWS resources. 3. Configure your Elastic Beanstalk environment: Next, you need to configure your Elastic Beanstalk environment to use the SSL certificate. You can do this by adding a listener to your Elastic Load Balancer (ELB) that is used by your Elastic Beanstalk environment. 4. Configure your DNS: Finally, you need to configure your DNS to route traffic to the HTTPS endpoint. You can do this by adding a CNAME record to your DNS provider that point

Moving your career into the cloud, Why ?

  Moving your career into the cloud can provide many benefits and opportunities for growth. Here are some reasons why you should consider it: 1. High demand: Cloud computing is in high demand as businesses and organizations shift their infrastructure and services to the cloud. This means that there are plenty of job opportunities in the field, and it's likely that the demand will continue to grow. 2. Flexibility: Cloud computing allows for greater flexibility in terms of where and when you work. Many cloud computing jobs can be done remotely, which can provide more flexibility in terms of scheduling and location. 3. Constant innovation: The cloud is a fast-paced and constantly evolving field, with new technologies and tools being developed all the time. This means that there is always something new to learn and new opportunities for growth. 4. Competitive salaries: Cloud computing professionals are in high demand, which can lead to competitive salaries and benefits. Opportuniti

AWS Cloud Financial management

 AWS Cloud Financial Management involves effectively managing the cost of using AWS services to ensure that the organization achieves maximum value from its cloud investment. Here are some key concepts to consider for managing your AWS cloud financials: Understand the AWS pricing model: AWS offers a pay-as-you-go pricing model, which means that you only pay for what you use. However, it's important to understand the various pricing components, such as compute, storage, data transfer, and other services to plan for and optimize costs. Establish cost management practices: AWS offers various tools for monitoring and analyzing usage and costs, such as AWS Cost Explorer, AWS Budgets, and AWS Cost Anomaly Detection. Establishing cost management practices, including setting budgets, defining cost allocation tags, and regularly reviewing usage and costs, can help you manage and optimize your cloud spend. Optimize usage and costs: There are several strategies for optimizing your usage an

AWS pricing model

AWS uses a pay-as-you-go pricing model, which means that you only pay for the services that you actually use, and you are not required to make any upfront payments or long-term commitments. This can be a cost-effective way to use cloud services, especially if your usage patterns are unpredictable or if you need to scale up or down quickly. There are several factors that can affect the cost of using AWS services, including: 1.The type and quantity of services that you use 2.The region where you use the services 3.The amount of data transfer or storage that you use 4.The duration of your usage To get a more detailed understanding of the pricing for specific AWS services, you can refer to the AWS pricing page: https://aws.amazon.com/pricing/ Additionally, AWS provides a cost management tool called AWS Cost Explorer that allows you to view and analyze your AWS costs, and provides recommendations on how to optimize your spending. You can learn more about AWS Cost Explorer here: https://aws.

Core 5 Security Epics in AWS Cloud

Image
AWS Core Security EPICs refer to the foundational security features and capabilities provided by Amazon Web Services (AWS) to ensure the security of customer data and resources in the cloud. EPICs stands for "Elevated Privileges Isolation and Control," which are key principles of cloud security. Identity and Access Management (IAM) - AWS IAM is a powerful tool that helps users manage access to AWS resources. It provides a centralized view of all users and resources, allowing administrators to create, manage, and enforce security policies. IAM enables administrators to create roles with specific permissions, set up policies that define which actions can be performed on resources, and manage users and groups. IAM also supports multi-factor authentication (MFA), which provides an extra layer of security for users. Network Security - AWS provides a wide range of security controls to help protect the network infrastructure. These include virtual private cloud (VPC), network acces

Why do you need to monitor your network?

Image
               Monitoring  your network is essential for several               reasons, including: Security: Monitoring your network can help you identify potential security breaches or threats, such as unauthorized access or suspicious activity. It allows you to take action quickly to prevent or minimize any damage caused by a security incident. Performance: Monitoring your network can help you identify performance issues such as slow network speed or bandwidth constraints. You can then take action to optimize your network to improve its performance. Availability: Network downtime can result in lost productivity and revenue. Monitoring your network can help you identify and resolve issues quickly, reducing the amount of downtime your network experiences.                                                                                     Compliance: Depending on your industry or organization, you may be required to meet specific compliance requirements. Network monitoring can help y

Services which require AWS VPC

VPC, or Virtual Private Cloud, is a service provided by cloud computing providers that allows users to create a virtual network environment in the cloud. Here are some of the services that typically require the use of VPC: 1. EC2 instances: Amazon Elastic Compute Cloud (EC2) instances are virtual servers that can be used to run applications in the cloud. When you launch an EC2 instance, you can choose to launch it in a VPC. 2. RDS instances: Amazon Relational Database Service (RDS) is a managed database service provided by Amazon Web Services (AWS). When you create an RDS instance, you can choose to launch it in a VPC. 3. Lambda functions: AWS Lambda is a serverless computing service that allows you to run code without provisioning or managing servers. When you create a Lambda function, you can choose to run it in a VPC. 4. Elastic Load Balancers: Elastic Load Balancing (ELB) is a service provided by AWS that automatically distributes incoming application traffic across multiple ta

How to backup EC2 instance

 There are several ways to backup an EC2 instance: 1.Using Amazon EBS Snapshots: You can create a snapshot of the Amazon Elastic Block Store (EBS) volume that's attached to the EC2 instance. This creates a point-in-time backup of the volume, which you can use to restore the data in case of a failure. 2.Using Amazon S3: You can use Amazon S3 to back up the data stored on your EC2 instance. This involves setting up an S3 bucket, configuring the AWS CLI or SDK to copy the files from the instance to the bucket, and then scheduling the backup job. 3.Using third-party backup solutions: There are several third-party backup solutions available in the AWS Marketplace that can be used to backup EC2 instances. These solutions usually offer more advanced features and flexibility than the built-in backup options. It's important to regularly backup your EC2 instances to ensure that your data is protected in case of a failure or disaster.

AMI security considerations

Disable unsecure applications:- Disable services and protocols that use clear text authentication. Minimize exposure:- Disable non-essential network services on startup. Disable default services like file sharing, print spooler, and RPC if not needed. Protect credentials when baking AMIs :- Delete all AWS and third-party credentials from disk and configuration files. Delete all user SSH public and private key pairs. Remove and disable passwords for all user accounts.

What is data protection and why is it important ?

Basically Data protection refers to the process of ensuring that personal information is kept secure and confidential. This is important because personal information, such as names, addresses, financial details, and health records, can be sensitive and can cause harm if it falls into the wrong hands. Data protection laws, such as the European Union's General Data Protection Regulation (GDPR), exist to protect individuals' rights to privacy and security and to regulate the way organizations handle personal information. Ensuring data protection helps build trust between organizations and their customers, clients, or patients, and helps prevent identity theft, financial fraud, and other forms of abuse. Cloud Data protection in the cloud refers to the measures that organizations take to secure and protect personal data stored in cloud computing environments. With cloud computing, data is stored on servers and other infrastructure owned and operated by third-party cloud service prov

Automatically forward Gmail email to another account

Image
To forward Gmail messages automatically to another email account, follow these steps: Log in to your Gmail account. Click the gear icon in the upper-right corner and select “Settings”. Select the “Forwarding and POP/IMAP” tab. Click on “Add a forwarding address” and enter the email address you want to forward to. Confirm the forwarding address. In the “Forwarding and POP/IMAP” tab, select “Forward a copy of incoming mail” and choose your forwarding address. Save changes by clicking on the “Save Changes” button at the bottom of the page. Your Gmail messages will now be automatically forwarded to the specified email address.

AWS Security Audit

An AWS security audit involves evaluating the security of your AWS environment to identify potential vulnerabilities and ensure that you are following best practices for securing your resources. Here are the steps you can follow for an AWS security audit: Inventory: Identify all the resources in your AWS environment and categorize them based on their level of criticality. Configuration Review: Check the configuration of AWS services such as VPC, IAM, RDS, EC2, S3 and more to ensure that they are in line with AWS security best practices. Access Control: Verify that only authorized users have access to sensitive data and resources and that proper access control policies are in place. Network Security: Ensure that your network is properly segmented and that network traffic is properly monitored. Encryption: Ensure that sensitive data is encrypted both in transit and at rest, and that encryption keys are properly managed. Logging & Monitoring: Verify that logs are being collected

what are the benefits of using aws organizations

 AWS Organizations enables central management of security and compliance policies across multiple AWS accounts. For example, security administrators can use AWS Organizations to set up a security baseline policy that automatically applies security controls such as network access controls and audit logging across all member accounts. This helps ensure that all accounts are consistently meeting security and compliance requirements, reducing the risk of data breaches and other security incidents. 1.Centralized account management 2.Cost allocation and tracking 3.Consolidated billing 4.Improved security and compliance 5.Policy-based management 6.Improved resource sharing and collaboration 7.Easier multi-account management.

TOP 10 online community for AWS cloud security

1.AWS Security Community on Reddit: https://www.reddit.com/r/aws/ 2.AWS Security Hub on the AWS Community Hub: https://aws.amazon.com/security/security-hub/    AWS Security YouTube channel: https://www.youtube.com/user/AmazonWebServices/search?query=security 3.AWS Security Slack channel: https://aws-community.slack.com/archives/C012N1BV8DG 4.Cloud Security Alliance (CSA): https://cloudsecurityalliance.org/ 5.AWS Security official forum on AWS Developer Center: https://forums.aws.amazon.com/forum/497 6.OWASP (Open Web Application Security Project): https://owasp.org/ 7.Information Security Community on LinkedIn: https://www.linkedin.com/groups/3116/ 8.Cloud Security Professionals group on LinkedIn: https://www.linkedin.com/groups/138546/ 9.Global Information Assurance Certification (GIAC) Professional Security Community:   https://giac.org/certifications/professional-security-communities 10.Security Besides community events around the world: https://securitybsides.com/

Is CloudOps and DevOps Same ?

 CloudOps and DevOps are related, but they are not the same thing. DevOps is a software development practice that emphasizes collaboration and communication between development and operations teams. It aims to improve the speed and quality of software delivery by breaking down silos between development and operations, and by automating many of the processes involved in software development and deployment. CloudOps, on the other hand, is specifically focused on the management and optimization of cloud computing resources. It involves practices and processes for provisioning and scaling resources, monitoring and troubleshooting, and ensuring compliance with security and governance policies. While DevOps and CloudOps have different goals, they share many of the same principles and tools. For example, both rely heavily on automation, monitoring, and collaboration. Additionally, many organizations that use cloud resources also adopt DevOps practices to manage and optimize their use of those

What is the CloudOps ?

CloudOps refers to the set of practices and processes that are used to manage and optimize the use of cloud computing resources. This can include tasks such as provisioning and scaling of resources, monitoring and troubleshooting, and ensuring compliance with security and governance policies. There are several tools that can be used to support CloudOps, including:  1.Cloud Management Platforms (CMPs): These tools provide a central console for managing multiple cloud environments and services, and can include features such as monitoring, automation, and cost management. Examples of CMPs include AWS Management Console, Azure Portal, and Google Cloud Console. 2.Configuration Management Tools: These tools can be used to automate the provisioning and configuration of cloud resources, and can include features such as version control and rollback capabilities. Examples include Ansible, Chef, and Puppet. 3.Monitoring and Logging Tools: These tools can be used to collect and analyze data on c

Top 25 Amazon AWS Interview Questions & Answers ~ Raghvendra Singh

  I am sharing few common AWS interview questions and answers which will help you in your interview. Que 1- Can you describe a project you have worked on that involved the use of AWS cloud services ? Ans- I recently worked on a project for a retail company that involved migrating their on-premises e-commerce platform to the AWS cloud. We used a variety of services including EC2, S3, and RDS to create a highly-available and scalable solution. Note- Answers to the this questions may be different as per your current roles and Job responsibilities. I have given idea how you can answer to this question. Que 2- How do you stay updated on the latest AWS services and features? Ans-  I stay up-to-date on the latest AWS services and features by regularly visiting the AWS website and reading the AWS blog. I also attend AWS webinars and events and have AWS certification which are always updated with the latest features and services. Que 3- How do you troubleshoot and resolve issues related to AW