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
