Skip to content

Instantly share code, notes, and snippets.

View ericsalesdeandrade-zz's full-sized avatar

Eric Sales De Andrade ericsalesdeandrade-zz

View GitHub Profile
import boto3
def get_car(event, context):
try:
s3 = boto3.resource('s3')
client_s3 = boto3.client('s3')
brand_upper = event["brand"].upper()
bucket = s3.Bucket("car-images-hd")
for obj in bucket.objects.filter(Prefix=brand_upper + '/'):
{
"Resources": {
"IAMLambdaServiceRole":
{
"Type": "AWS::IAM::Role",
"Properties": {
"RoleName": "LambdaServiceRole",
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [