AWS Classroomnotes 19/Jul/2023

AWS App runner

  • AWS App runner is a PaaS offering like Elastic Beanstalk
  • AWS App runner internally uses ECS container technology by AWS,
  • We can specify our build and run settings manually or in configuration file apprunner.yaml
  • the latest version of the code is available at Refer Here
  • For screenshots refer classroom video
  • After succesful deployment access the url
  • Make changes and wait for deployment to be success

Serverless

  • In serverless we build functions, which when executed will be charged
  • AWS offers serverless with AWS Lambda which charges per millisecond
  • Lets create a lambda function

  • Lets try writing a lambda function which shows ec2 instance ids in oregon region
import json
import boto3

def lambda_handler(event, context):
    # TODO implement
    ec2 = boto3.client('ec2')
    response = ec2.describe_instances()
    instances = []
    for instance in response['Reservations'][0]['Instances']:
        instances.append(instance['InstanceId'])
    return {
        'statusCode': 200,
        'body': json.dumps(instances)
    }
  • the above function will be charged only when called.

Exercise

  • Figure out what lightsail is doing
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%