-
- Private work.
- Finished the re:invent innovation talks.
- Overall, not a lot gained. The keynotes have the valuable releases. The breakouts have the detail to learn/deepdive. These innovation talks are a weird middle ground.
- Multiple genAI talks started with the same proof: “AI, write me an intro”
- Developer experience. Q, codewhisperer, codecatalyst, java upgrade tool, etc.
- Codecatalyst is like an AI-managed suite of source management, issues, CICD, templates – basically gitlab but with Q.
- You can’t really access any of the cool codecatalyst features on the free/individual tier, like assigning issues to Q.
- Paid ortho.
- Streamlit is another pure-python-to-webapp tools.
- Obviously w2 = employees, w9 = contractors.
- Remember both aws codewhisperer and ms copilot are doing autocomplete/autosuggest inline in vscode.
- Prequalification is less than preapproval. It’s usually self-reported -> quick estimate Preapproval is more – the lender actual verifies your financial statement.
- 1031 exchange. Selling an investment property and buying another similar. Defers capital gains tax.
- Zoom webinar hosted by datadog: how to monitor a genAI stack.
- Remember engines are sqla’s lowlevel. You then create a connection from an engine. A session is the higher-level object that uses the ORM to interact via an engine/connection.
- For this most recent leetcode contest, 1st place was all 4 problems in 16min.
- One of the worst contaminants to look for in tap water is fluoride. Affects thyroid function. Checked a few repos, nyc is ok.
- Supercontest.
- Updated banner.
- Added multiple lambda functions (and corresponding IAM roles + API gateway endpoints) and played with them. Interactions, imports. CLI commands, generic invokes or specific calls to a func.
- Remember to
sam build
before sam deploy
.
AWS::ApiGateway::RestApi
is from cloudformation. Use it to directly manage an API gateway. AWS::Serverless::RestApi
is from SAM. It manages a lot of the config for you. Use that one.
- The
Outputs
section of template.yaml
doesn’t feed directly to anything on the deploy of the cloud formation. It just exposes dynamic content from the stack build. You can export things like the API gateway URL, the ARNs of the created resources, etc. These print to the command line for immediate testing, and they export to the actual CF template – allowing subsequent use in other SDKs, CLIs, whatever.
- If you want to share code across multiple lambdas:
- One option is S3. Simply tell SAM that “this lambda needs this S3 bucket”, and then tell SAM which files (shared libs) to upload to that S3 bucket on every deploy. You’re just using S3 as your common-code host.
- Another best practice is Lambda Layers. SAM supports this natively. Layers are a little better because Lambda’s execution engine understands how to cache layers. S3 has caching, but it’s cross-tool instead of native.
- Successfully did #2 with
AWS::Serverless::LayerVersion
. Builds the shared lib and makes it avail to the lambda.
- Added
boto3
to pyproject. Ultimately I’ll probably just maintain one large set of reqs for the whole project, create and version a single layer from that, and all serverless functions wrap around it. Then I can point my IDE at that (in vscode you can point at a requirements.txt rather than a python interpreter) for highlighting/resolution/dev.
- Added stubs to boto3, and the specific services (sqs, eventbridge, etc) that I need. Just for typechecking in serverless dev.
- Remember this error is from
psycopg2
(switched to psycopg2-binary
long ago): [ERROR] ImportError: libpq.so.5: cannot open shared object file: No such file or directory
.
- Now that these snippets are running in lambda, I can use
sqlalchemy
directly – no need for flask-sqlalchemy
since it’s not running in an app context.
artifact_store_retention = 10
in samconfig.toml
to control how many deployments are stored in s3 (remember this is the template and the code and everything, so all resources like lambda/apigateway/etc can read from this).”
- Local
sam build
and invoke
do not pass the Outputs
section of the template. This is because the local workflow doesn’t deploy anything; there are no ARNs/URLs/etc to reference, since CF has not pushed any. It’s just all local.
- I’ve noticed that copilot is much better than Q so far. Q had wrong information multiple times today:
AWS::Serverless:Queue
(AWS::SQS::Queue
).
- SAM does not auto-inject Outputs into the envs of lambda functions. You have to add it to the env section of the func resource in the template.
- A few others.