In order to build Docker images for Lambda functions with CDK on ARM or other non-Intel platforms, but want the Lambda to be on an x8664 platform, use the platform parameter…
Posts for: #Aws
Strategies for Mocking AWS Services for Testing
Boto3 comes with the Stubber class, but it doesn’t work well for all calls. In those cases
Using Step Functions for Fan-Out or Scatter-Gather
You can use a Map State for this. You define it like so in CDK:
Switching AWS CLI Profiles
To see all profiles: aws configure list-profiles To see currently set profile: aws configure list To change the profile, set the AWSPROFILE environment variable: export…
DynamoDB Can Take a Static Table Name
CDK autogenerates resource names for every resource in your stack. However some, like DynamoDB, can take a tablename argument, making it a statically named resource. There are…
Running a Jupyter Notebook From a Docker Container Running on EC2
Given a Dockerfile on an EC2 instance that has, at the very least, these commands at the end: EXPOSE 8888 ENTRYPOINT ["/bin/bash"]
Invalid Cross-Device Link when Deploying with CDK
When deploying with CDK, I started out of nowhere getting this error: OSError: [Errno 18] Invalid cross-device link: ‘/tmp/pip-target-e4qns87/lib/python/numpy’ ->…
Fixing Runtime Exited Without a Reason Errors in AWS Lambda
This happens sometimes with Dockerized Lambdas. I have no idea why, but fixing it usually consists of rebuilding and re-pushing the docker image, redeploying it to the Lambda,…
import os Causing Counterintuitive Errors in Sagemaker
My suspicion is that the our internal package requires os as a dependency to open a file, and that causes some kind of clash with AWS.
Deploying a Flask App to AWS Elastic Beanstalk with CDK and With the AWS Console
- Initialize construct 2. Zip flask code 3. Set up options for application, env vars, and app version 4. Set environment 5. Make sure environment is built after CDK application