Create lamda container image from ubuntu - amazon-web-services

I'm recently started exploring aws lambda for implementing one of the usecase. I have already developed an application based on Ubuntu OS and it is working fine in containers. When I started exploring building custom image with lambda, they are providing Amazon linux & ami varients. But my application already developed based on Ubuntu and I would like to use it with lambdas. Kindly provide references or samples that will help me.

You can use any image you build (up to 10GB) and use it with AWS lambda. Basic steps:
build Ubuntu image with your application code
push this image to AWS ECR
create AWS lambda and specify URI to ECR image
More detailed info is in this post:
https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/

Related

SAM Accelerate for container images

I am trying to use sam cli for remote development, but the issue is sam sync doesnt work if the package type is images.
Any one got this working who could share his thoughts ?
Using sam accelerate for native lambda runtime vs containers on lambda

AWS SageMaker - Upload our own docker image

I am new to AWS SageMaker and i am using this technology for building and training the machine learning models. I have now developed a docker image which contains our custom code for tensorflow. I would like to upload this custom docker image to AWS SageMaker and make use of it.
I have searched various links but could not find proper information on how to upload our own custom docker image.
Can you please suggest me the recommended links regarding the process of uploading our own docker image to AWS SageMaker?
In order to work with sagemaker, you have to push your container to ECR. The most important thing is that the container must be "adapted" to be complaint to what sagemaker requires, but everything is described here. In addition if you want to take a look to an example, here is mine.. where I use my container with TF Object Detection API in AWS Sagemaker.

Run AWS Lambda inside Docker in local

I'm new to AWS and for learning purpose I created a free AWS account. I don't want to install all dependencies, packages and configure them with my test account in my pc until I learn them well. So I planned to create a docker image so I can do configurations later in my pc. But I can't find any good example how to set up docker image for AWS Lambda. Can you please help me to set up docker image?
p.s
I'm using NodeJs
Check out https://github.com/localstack/localstack - A fully functional local AWS cloud stack (Lambda as well).
The solution will depend on language you are going to use for lambdas.
Try some tutorials, i.e. the next descibes how to simulate lambda for python:
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-layer-simulated-docker/
Recent AWS blog describes how to do it:
How do I create a Lambda layer using a simulated Lambda environment with Docker?
Basically you can run already made docker image for that:
https://hub.docker.com/r/lambci/lambda/
This is the same docker image used by AWS's SAM (Serverless Application Model) when you test your lambda function locally. Thus this is the closest you can get to the real lambda environment.

Is it Possible to Integrate AWS EC2 Image Builder with CI/CD tools like Jenkins, Semaphore ad Build Golde Images from that.?

Hi I have tried to build Golden Image from Locally/API by adding my Service/Packages.
But, Is it possible to Integrate with CI/CD tools like webhook. Whenever pushes happen needs to build the golden Image using EC2 Image Builder.
Just as Marcin said, it all depends what do you mean by "integrate". AFAIK you can use AWS EC2 with most of them. Personally I'm using buddy.works and I'm using AWS EC2 there.
You can check their documentation: https://buddy.works/docs/deployments/aws/ec2
Let me know if that's what you've been looking for.

Creating amazon ec2 windows AMIs using amazon sdk in java

I am writing an application which would enable my company's future clients to be able to launch Amazon aws instances with Windows OS. Hence, I would want to create windows AMIs first. The article below gives a step by step approach for creating EBS-backed windows AMIs using Amazon AWS console.
http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_EBSbacked_WinAMI.html
But when I tried looking up the methods provided by CreateImageRequest API provided by Amazon SDK, I couldn't quite figure out how to replicate the AWS management console process for creating a windows image in Java. I exhausted my google searches and I came up empty. Has anyone tried this? Is this even possible at all to create Windows images through Amazon SDK?
I found that CreateInstanceRequest API has an option to specify the OS types but the options are limited to Amazon Linux or Ubuntu 12.04 LTS. The documentation for CreateInstanceRequest is below:
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/opsworks/model/CreateInstanceRequest.html
I would appreciate any useful link or code snippet. Thanks.
I don't completely understand what you are trying to achieve.
Do you want to start an instance in EC2 or with OpsWorks because your second link points to the OpsWorks documentation.
OpsWorks dosen't support Windows right now.