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
    Preview
  • Make changes and wait for deployment to be success
    Preview

Serverless

  • In serverless we build functions, which when executed will be charged
    Preview
  • AWS offers serverless with AWS Lambda which charges per millisecond
  • Lets create a lambda function
    Preview
    Preview
  • 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 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 Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube