AWS IAM 相关概念

1. IAM Role(IAM 角色) 什么是 IAM 角色? IAM 角色是 AWS 提供的一种 身份,类似于用户,但它不是为特定人创建的,而是赋予 AWS 服务或其他身份的权限集合。 角色的特点:临时性、需要通过某种机制“扮演”(assume)角色后才能使用它的权限。 使用场景: 一个 EC2 实例需要访问 S3 存储桶,但不需要使用长期密钥(如 Access Key 和 Secret Key)。 AWS Lambda 函数调用 DynamoDB 时需要临时权限。 示例: 假如一个角色被授予读取 S3 的权限,那么 EC2 或 Lambda 可以在运行时“扮演”这个角色来访问 S3。 2. IAM Policy(IAM 策略) 什么是 IAM 策略? IAM 策略是用来 定义权限 的文档,通常以 JSON 格式编写。 它规定了“谁可以做什么”,具体定义: 谁:角色、用户或组。 […] →Read more

What’s AWS ARN

Amazon Resource Names (ARNs) uniquely identify AWS resources. We require an ARN when you need to specify a resource unambiguously across all of AWS, such as in IAM policies, Amazon Relational Database Service (Amazon RDS) tags, and API calls. ARN format The following are the general formats for ARNs. The specific formats depend on the […] →Read more

AWS SDK doc

https://docs.aws.amazon.com/pdfs/sdk-for-java/latest/developer-guide/aws-sdk-java-dg-v2.pdf →Read more

What’s AWS STS

Security Token Service Security Token Service (STS) enables you to request temporary, limited-privilege credentials for users. Use AWS Security Token Service (AWS STS) to create and provide trusted users with temporary security credentials that can control access to your AWS resources. Temporary security credentials work almost identically to long-term access key credentials, with the following […] →Read more

Hard skills and soft skills

1. Hard Skills (Technical Skills) These are the measurable, teachable skills directly related to software development. a. Programming and Software Engineering Fundamentals Programming Languages: Learn multiple paradigms (e.g., Object-Oriented, Functional, Procedural). Examples: Python, Java, C++, JavaScript, Rust, etc. Data Structures and Algorithms: Understand core concepts like arrays, linked lists, trees, graphs, sorting, and searching algorithms. […] →Read more

Vault for security

Identity & access management User & group management Service principals SSO MFA Role-based access control Resource-based access control Workload Identity Federation Secrets lifecycle management Static secrets Auto-rotating secrets Dynamic secrets Secrets sync Secret versioning Secret import Webhooks Integrations HCP Terraform AWS Azure Google Cloud Platform Kubernetes GitHub Vercel MongoDB Atlas Twilio Log streaming Security & […] →Read more

文本分割的方法

长文本分割是构建高效检索系统的重要步骤,好的分割方法需要兼顾语义完整性和块大小适中。我们要避免简单的固定长度切分导致语义丢失的问题: 1. 基于句子分割 方法 使用自然语言处理工具将文本分割成句子,然后再组合成适当大小的块。 实现示例 import nltk from nltk.tokenize import sent_tokenize # 下载 punkt 分词器(首次运行需要) nltk.download('punkt') def split_text_by_sentences(text, chunk_size=300): sentences = sent_tokenize(text) chunks = [] current_chunk = "" for sentence in sentences: # 如果当前块加上新句子的长度超过 chunk_size,则开始新块 if len(current_chunk) + len(sentence) > chunk_size: chunks.append(current_chunk.strip()) current_chunk = sentence else: current_chunk += " " + sentence # 添加最后一个块 […] →Read more

AWS Identity and Access Management

Overview AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. With IAM, you can manage permissions that control which AWS resources users can access. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources. IAM provides the infrastructure […] →Read more

构造个人知识库来提高学习能力

明确学习目标 先确定要了解的具体软件项目以及相关的领域方向,例如是做电商类项目,那就要聚焦电商系统的架构、功能模块等知识;若是移动端开发领域,就锁定对应的移动端技术知识等。 收集基础信息 向大语言模型输入项目或领域的关键名称,让它介绍基本概念、常见用途、发展历程等,像询问“请介绍下电商项目中订单管理模块的主要功能”,把得到的信息整理记录。 请它推荐相关的经典开源项目、常用技术框架以及学习资料,如书籍、优质博客等,再把这些资源收集起来。 梳理知识架构 以软件项目为例,按照项目从需求分析、设计、编码到测试等流程梳理知识;对于领域知识,则可以按照技术分类等搭建框架,如移动端开发可分安卓、iOS不同板块来梳理,然后把收集到的对应知识填充进去。 制作思维导图,让各部分知识的层级、关联更明晰直观。 深入提问拓展 针对梳理好的知识里不太明白的点,继续问大语言模型,比如某个技术框架在实际项目中如何优化性能,不同模块间怎样高效交互等,进一步完善知识库内容。 持续更新迭代 软件开发领域不断有新技术、新需求出现,定期通过大语言模型了解相关动态,把新知识补充进知识库,确保自己的知识储备能与时俱进。 →Read more

JMPP 让 XMPP 协议老树开新花

XMPP 是若干年前流行的即时通信 IM 协议, 据说起初的 QQ 就采用了这个协议, 我多年以前也用过它实现过多人聊天, 类似今天的微信群, 时至今日, XMPP 由于采用了 XML 这个冗长的格式, 日趋式微, 我以前就想过用 JSON 来替换 XMPP 中的 XML 格式, 姑且叫它 JMPP(Json Messaging and Presence Protocol) 吧。 XMPP 协议基础知识 XMPP 的核心概念 消息(Message):用于传递即时消息。 状态(Presence):用户在线状态(例如在线、离线、忙碌)。 信息查询(IQ):实现请求-响应模式,用于功能扩展。 Jabber ID(JID):唯一标识用户的地址,类似于 email 地址,例如 user@domain/resource。 XMPP 的通信模型 XMPP 使用客户端-服务器架构,通信过程包括: 客户端通过 TCP 连接到服务器。 使用 TLS 加密连接。 通过 SASL 完成身份验证。 交换 […] →Read more