Trending

#AWSSam

Latest posts tagged with #AWSSam on Bluesky

Latest Top
Trending

Posts tagged #AWSSam

Installing Finch to use with the AWS SAM CLI - AWS Serverless Application Model Instructions about installing Finch for use with the AWS SAMCLI.

Oh this makes me happy! With #AWSSAM now supporting finch, I am now completely off of Docker. docs.aws.amazon.com/serverless-a...

3 0 0 0
Preview
Getting Started with Leveraging Test Driven Development for AWS SAM | AntStack - Full-Stack Serverless Company Start your AWS SAM journey with Test-Driven Development (TDD). Learn how to enhance your serverless application development on Amazon Web Services.

Boost your AWS SAM development!

Learn how TDD improves design & reduces bugs.

Practical guide to TDD with Serverless & AWS.

Read the blog here: πŸ‘‰ www.antstack.com/blog/getting-started-with-leveraging-test-driven-development-for-aws-sam/

#AWSSAM #TDD #Serverless #Tech #AntStack

0 0 0 0
Preview
AWS Serverless: Build a Custom IAM Policy for Lambda CI/CD with SAM and GitHub – Part 2 In my previous article, I explained how to create a CICD pipeline to build and deploy a simple lambda function integrated with API Gateway using AWS SAM and GitHub. Please make sure you've reviewed this article on this CI/CD topic (link below). I won’t repeat that content here, but understanding it is essential for following along with the custom policy setup in this article. https://dev.to/bhatiagirish/aws-serverless-build-a-cicd-pipeline-for-lambda-and-api-gateway-using-sam-and-github-part-1-313b While building this solution, I temporarily assigned broad permissions such as full access to services like S3, CloudFormation, Lambda and API Gateway. Assigning these full access permission is against the principle of least privilege that means grant only the specific permissions required. In this article, I will focus on replacing these broad permissions with a custom fine grained IAM policy that only grants the permissions required by this pipeline. This approach aligns with AWS security best practices and the principle of least privilege helping reduce security risks and improve overall security posture of the AWS environment. Let's look at the architecture diagram! **Why Use a Custom Policy?** Using custom policies for CICD pipelines offers several advantages for enterprises. Principle of least privilege is an important factor for overall security posture. By implementing the principle of least privilege, you can significantly improve your security posture and operational efficiency. Custom policies can help in several areas including: **Limit potential impact if credentials are ever compromised** * Example: Restrict S3 access to only the specific bucket used for SAM deployment artifacts rather than allowing wildcard access to all buckets. * Example: Limit CloudFormation permissions to only the named stack used for deploying the Lambda and API resources. **Awareness of what permissions their automation requires** * Example: Allow updates to specific Lambda functions, but restrict permission to create or delete unrelated AWS resources like DynamoDB or IAM roles. * Example: Permit API Gateway stage deployments only to defined stages like dev, test or permission to specific methods like Get and Post **Prevent unintended resource creation or deletion** * Example: Deny s3:DeleteBucket and cloudformation:DeleteStack to avoid accidental loss of critical deployment artifacts or stacks. **Support document and demonstrate security control required for compliance** * Example: Create IAM policies that clearly define allowed actions (like lambda:UpdateFunctionCode, apigateway:POST, cloudformation:DescribeStacks) and map directly to each pipeline step. * Example: Provide audit-ready IAM documentation showing that the CI/CD pipeline operates with least privilege. **Review Custom Policy** Below is an example of a custom IAM policy tailored for a CI/CD pipeline that deploys a Lambda function and API Gateway using AWS SAM. This pipeline is triggered by a code push to a GitHub repository and uses AWS CodePipeline and CodeBuild to build and deploy the serverless application. The policy grants only the necessary permissions to interact with Lambda, API Gateway, S3, and CloudFormation, following the principle of least privilege. Once this policy is drafted, attach it to the role for the code build/code pipeline. **Push a code change to Git Repo** Let’s make a change to the Lambda function and commit the updated code to the Git repository. Once the changes are pushed, this will automatically trigger the AWS Code Pipeline. After the pipeline starts, we’ll review the build and deployment stages to confirm the updated function is successfully redeployed. You can see that the pipeline automatically triggered the Source and Build stages, both of which completed successfully! **Validate by Invoking the deployed function and API** Since the pipeline has successfully completed, the updated Lambda function and API have been deployed. Let's validate again using Postman. You should now see the updated message returned by the Lambda function through the API endpoint, confirming that the changes were successfully deployed. **Review S3 bucket for Code artifact** You can also review the S3 bucket where AWS Code Pipeline stores the build artifacts generated during the pipeline execution. **Review Cloud Watch log** The Lambda function is integrated with CloudWatch, and a dedicated log group is automatically created. You can view the logs by navigating to the function’s log group in the CloudWatch Logs section of the AWS Console. **Cleanup - Delete resources** Once you’ve completed this exercise, make sure to delete all the resources created to avoid unnecessary charges that could impact your overall cloud cost and budget. In particular, remember to delete the following: * The AWS Code Pipeline * The CodeBuild project * Any S3 buckets used for artifacts (if not reused elsewhere) * The Lambda function, API Gateway, and associated CloudWatch log groups * IAM roles created for the pipeline and build process (if they’re not reused) **Conclusion** In this article, I demonstrated how to build a custom IAM policy for a Lambda CI/CD pipeline using AWS SAM and GitHub. Using a custom policy helps ensure that the Code Pipeline adheres to the principle of least privilege, keeping your AWS resources more secure. I hope you found this article both helpful and informative! Thank you for reading! Watch the video here: π’’π’Ύπ“‡π’Ύπ“ˆπ’½ ℬ𝒽𝒢𝓉𝒾𝒢 𝘈𝘞𝘚 𝘊𝘦𝘳𝘡π˜ͺ𝘧π˜ͺ𝘦π˜₯ 𝘚𝘰𝘭𝘢𝘡π˜ͺ𝘰𝘯 𝘈𝘳𝘀𝘩π˜ͺ𝘡𝘦𝘀𝘡 & π˜‹π˜¦π˜·π˜¦π˜­π˜°π˜±π˜¦π˜³ 𝘈𝘴𝘴𝘰𝘀π˜ͺ𝘒𝘡𝘦 𝘊𝘭𝘰𝘢π˜₯ π˜›π˜¦π˜€π˜©π˜―π˜°π˜­π˜°π˜¨π˜Ί 𝘌𝘯𝘡𝘩𝘢𝘴π˜ͺ𝘒𝘴
0 0 0 0
Preview
AWS - Twitch Security LIVE! with Sysdig and NETSCOUT

Today on #Serverless Office Hours, I'll be showing you how I code locally. Some #AWSSam, #AWSToolKit, #WorkflowStudio, #Bedrock, so on and so forth. Learn some tips and tricks and teach me some too. Meet me at 11 AM PT on twitch.tv/aws

1 0 0 0

2️⃣
πŸ‘‹ Want more updates on serverless tech, AWS releases, and dev tips?

Hit that follow for expert insights!

#AWSSAM #AWS #Serverless #APIGateway

2 0 0 0
Preview
Optimizing AWS SAM Node.js Lambda with esbuild In the previous post, we created a basic Node.js Lambda function using AWS SAM. Now, we’re going to take it a step further by optimizing our build process using `esbuild`. This tool is a lightning-fast bundler and minifier that reduces deployment package size and speeds up cold start times. In this guide, we’ll: * Add `esbuild` to our AWS SAM project * Configure SAM to use `esbuild` as the build method * Handle external dependencies * Compile TypeScript (optional) ## Prerequisites Ensure you’ve completed the setup from Part 1, and you have a working AWS SAM project using Node.js. You’ll also need: * Node.js installed * `esbuild` (we’ll install it locally in the project) ## Step 1: Install esbuild Navigate to your Lambda function directory (e.g., `hello-world/`) and install `esbuild`: cd hello-world npm install --save-dev esbuild If you’re using TypeScript: npm install typescript ## Step 2: Update Your `template.yml` Modify your `template.yml` to tell AWS SAM to use `esbuild` for building your Lambda: Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs18.x Architectures: - x86_64 Events: HelloWorld: Type: Api Properties: Path: /hello Method: get Metadata: BuildMethod: esbuild BuildProperties: Minify: true Target: "es2020" Sourcemap: false EntryPoints: - index.ts External: - "@aws-sdk/*" **Breakdown:** * `BuildMethod: esbuild`: Enables `esbuild` as the compiler. * `Minify: true`: Reduces the size of the compiled output. * `EntryPoints`: The main source file(s). * `External`: Keeps packages like `@aws-sdk/*` out of the final zip (as they're available in AWS Lambda's environment). ## Conclusion Using `esbuild` with AWS SAM helps you deploy faster, smaller Lambda functions, and makes TypeScript support super easy. In the next post.
0 0 0 0
Preview
Optimizing AWS SAM Node.js Lambda with esbuild In the previous post, we created a basic Node.js Lambda function using AWS SAM. Now, we’re going to take it a step further by optimizing our build process using `esbuild`. This tool is a lightning-fast bundler and minifier that reduces deployment package size and speeds up cold start times. In this guide, we’ll: * Add `esbuild` to our AWS SAM project * Configure SAM to use `esbuild` as the build method * Handle external dependencies * Compile TypeScript (optional) ## Prerequisites Ensure you’ve completed the setup from Part 1, and you have a working AWS SAM project using Node.js. You’ll also need: * Node.js installed * `esbuild` (we’ll install it locally in the project) ## Step 1: Install esbuild Navigate to your Lambda function directory (e.g., `hello-world/`) and install `esbuild`: cd hello-world npm install --save-dev esbuild If you’re using TypeScript: npm install typescript ## Step 2: Update Your `template.yml` Modify your `template.yml` to tell AWS SAM to use `esbuild` for building your Lambda: Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs18.x Architectures: - x86_64 Events: HelloWorld: Type: Api Properties: Path: /hello Method: get Metadata: BuildMethod: esbuild BuildProperties: Minify: true Target: "es2020" Sourcemap: false EntryPoints: - index.ts External: - "@aws-sdk/*" **Breakdown:** * `BuildMethod: esbuild`: Enables `esbuild` as the compiler. * `Minify: true`: Reduces the size of the compiled output. * `EntryPoints`: The main source file(s). * `External`: Keeps packages like `@aws-sdk/*` out of the final zip (as they're available in AWS Lambda's environment). ## Conclusion Using `esbuild` with AWS SAM helps you deploy faster, smaller Lambda functions, and makes TypeScript support super easy. In the next post.
0 0 0 0
Preview
Q-Bits: AWS SAM and Custom Authorizers for API Gateway Amazon Q Developer assisted blog post and AWS SAM based project for exploring API Gateway and custom authorizers.

"Q-Bits: AWS SAM and Custom Authorizers for API Gateway" by Troy Parrett

#amazonqdeveloper #q-bits #awssam #serverless #api

0 0 0 0
Preview
Serverless CI/CD: Automating Deployments with AWS SAM, CDK and GitHub actions Serverless CI/CD is a modern approach to software development that leverages serverless computing to...

✍️ New blog post by Kevin Kiruri

Serverless CI/CD: Automating Deployments with AWS SAM, CDK and GitHub actions

#awscdk #serverless #awssam #cicd

2 1 0 0
Preview
Q-Bits: Serverless API with AWS SAM and Amazon Q Developer Amazon Q Developer streamlines AWS SAM template creation and accelerates serverless application development

"Q-Bits: Serverless API with AWS SAM and Amazon Q Developer" by Chetan Makvana

#amazonqdeveloper #q-bits #awssam #serverless #api

0 0 0 0
AWS SAM + AWS SQS + Python PowerTools - Rost Glukhov | Personal site and technical blog AWS SAM + AWS SQS + Python PowerTools

Implementing asynchronous processing chain with AWS SAM + AWS SQS + Python PowerTools:
www.glukhov.org/post/2025/01...
#AWSSAM #AWS #SQS #Python #PowerTools #cloud #programming

0 0 0 0
Preview
Parameter Management at Scale: How Multi-Region Configurations Saved My Application In this post, I want to share a story about how significant downtime could have impacted the...

New post was published by Daniele Frasca
#aws #serverless #awssam

0 0 0 0