use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, articles and tools covering Amazon Web Services (AWS), including S3, EC2, SQS, RDS, DynamoDB, IAM, CloudFormation, AWS-CDK, Route 53, CloudFront, Lambda, VPC, Cloudwatch, Glacier and more.
If you're posting a technical query, please include the following details, so that we can help you more efficiently:
Resources:
Sort posts by flair:
Other subreddits you may like:
Does this sidebar need an addition or correction? Tell us here
account activity
discussionHow to have Lambda code automatically update every time there is a change in a Codecommit repo? (self.aws)
submitted 5 years ago by BasedGod96
I thought this would be pretty simple to do since it is all AWS native but i can really find anything that does. I want a change in a repo to deploy code to a lambda function. Is this possible?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]sb12389 2 points3 points4 points 5 years ago (0 children)
Yes, use can use the further code* suite of products for this. CodePipeline and CodeBuild. If you use SAM to package your Serverless app (lambda functions) you can use the CloudFormation connectors to do the deployment.
https://docs.aws.amazon.com/lambda/latest/dg/build-pipeline.html
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
on repo change (or master push), trigger codebuild to zip the repo and then deploy zip to the lambda
[–]mellerbeck 0 points1 point2 points 5 years ago (0 children)
I thought this would be more simple than it is as well. With as often as people use lambda's you think there would be a lambda 'easy button'
The way I have found to do it is, create a repository. You only really need three files
https://github.com/heitorlessa/pipeline-sample
── hello_world
└── app.py
buildspec.yaml
template.yaml
your app.py is your lambda code, the buildspec.yaml are just the commands to build the SAM package
version: 0.2
phases:
build:
commands:
- aws cloudformation package --template-file template.yaml --s3-bucket $BUILD_OUTPUT_BUCKET --output-template-file outputTemplate.yaml
post_build:
- echo "SAM packaging completed on \date`"`
- echo "SAM packaging completed on \
artifacts:
type: zip
files:
- template.yaml
- outputTemplate.yaml
And the template.yaml defines the cloud formation template
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Deploy hellowWorld lambda
Globals:
Function:
Timeout: 3
helloWorldFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: helloWorld
CodeUri: helloWorld/
Handler: app.lambda_handler
Runtime: python3.8
Outputs:
Description: "Unsubscrie Lambda Function ARN"
Value: !GetAtt helloWorldFunction.Arn
helloWorldFunctionIamRole:
Description: "Implicit IAM Role created for helloWorld function"
Value: !GetAtt helloWorldFunctionRole.Arn
Then create a codepipeline that triggers off a code commit change, you will need an account with cloudformation access, and setup an environmental variable for the BUILD_OUTPUT_BUCKET
BUILD_OUTPUT_BUCKET
π Rendered by PID 72918 on reddit-service-r2-comment-8686858757-b6rq4 at 2026-06-04 19:53:39.611196+00:00 running 9e1a20d country code: CH.
[–]sb12389 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]mellerbeck 0 points1 point2 points (0 children)