• How to identify when a spot instance receives a termination notice

    2 min read

    AWS EC2 instance metadata spot instances termination notice

    When running spot instances, if AWS needs to reclaim that capacity (or if the current Spot price exceeds our bid price) we will receive a two minutes grace period to be able to save any data we need.

    To check is we need to terminate our tasks on the spot instance we can use the instance's metadata

    24/05/2022

    Read more...
  • Indentify whether we are running an spot instance using AWS CLI

    2 min read

    On a running instance we might want to be able to identify whether it is a spot or on demand instance. We can use awscli to identify it

    23/05/2022

    Read more...
  • AWS EKS: reduce the number of reserved IPs

    4 min read

    EKS AWS ENI available IPs subnet

    If you are trying to run a EKS cluster on a small subnet you might run out of IPs sooner that you might think. Every time it has to attach or detach IPs an API call needs to be made, so to avoid getting API calls throttled it pre-reserves some

    16/05/2022

    Read more...
  • Install AWS cloud provider on a k3s cluster

    2 min read

    k3s aws cloud provider load balancer

    One of the drawbacks of installing k3s on a EC2 instance versus using EKS is that we loose the AWS integration, so we cannot use AWS load balancers by default. Thanks to the AWS cloud provider we can overcome this limitation

    10/05/2022

    Read more...
  • Deploy a lambda function using terraform

    4 min read

    AWS Lambda terraform aws_lambda_function archive_file

    To be able to deploy a lambda function there are several pieces that need to be deployed:

    • IAM roles: It might need to access to the AWS API, so we need to create an IAM role to control it's privileges
    • Triggering: We might want the function to get triggered with some event (that's what we are going to do on this post) or a load balancer
    • Code: What we want to execute
    • Lambda function itself

    05/05/2022

    Read more...

More recent...

Older content...