-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploying existing docker image #196
Comments
When deploying the serverless application using {
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "An AWS Serverless Application that uses the ASP.NET Core framework running in Amazon Lambda.",
"Parameters": {},
"Conditions": {},
"Resources": {
"AspNetCoreFunction": {
"Type": "AWS::Serverless::Function",
"Properties": {
"PackageType": "Image",
"ImageConfig": {
"EntryPoint": [
"/lambda-entrypoint.sh"
],
"Command": [
"AWSServerlessNET5::AWSServerlessNET5.LambdaEntryPoint::FunctionHandlerAsync"
]
},
"ImageUri": "",
"MemorySize": 256,
"Timeout": 30,
"Role": null,
"Policies": [
"AWSLambda_FullAccess"
],
"Events": {
"ProxyResource": {
"Type": "Api",
"Properties": {
"Path": "/{proxy+}",
"Method": "ANY"
}
},
"RootResource": {
"Type": "Api",
"Properties": {
"Path": "/",
"Method": "ANY"
}
}
}
},
"Metadata": {
"Dockerfile": "Dockerfile",
"DockerContext": ".",
"DockerTag": ""
}
}
},
"Outputs": {
"ApiURL": {
"Description": "API endpoint URL for Prod environment",
"Value": {
"Fn::Sub": "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"
}
}
}
} Not sure if setting |
This is being tracked as part of issue #264. The Also take note of findings in #264 (comment). Per https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html#sam-function-imageuri, |
|
If I ran the command below, it will build a docker image then push it to ECR and perform other steps.
I have a project which I must use
docker buildx build .
command to create a docker image. Is there a way to telldeploy-serverless
to use existing image instead?Describe the Feature
Allow user to specify an existing image when deploying lambda serverless with the command
dotnet lambda deploy-serverless
command.Maybe add a parameter called
--use-image
?Is your Feature Request related to a problem?
Proposed Solution
I have a project which I must use
docker buildx build .
command to create a docker image. There is no way to deploy this image withdotnet lambda deploy-serverless
commandDescribe alternatives you've considered
Maybe manually deploy the image to ECR then manually changing the Lambda configuration to use the new image?
Additional Context
I have an Apple M1 MacBook and trying to deploy an x64 image.
The command
dotnet lambda deploy-serverless
only create image for arm64 architecture. I need an x64 image so I have to usedocker buildx build
command to create an x64 image.Environment
Developer environment is Apple M1 MacBook (arm64 architecture)
Target environment is AWS serverless (x64 architecture). AWS do offer arm64 lambda serverless too but one of the project had native dependency on x64 and is it not possible to run it on arm64.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: